Archive

Author Archive

tweeting server status

March 11th, 2011 No comments

Since I’ve discovered twidge I find Twitter very useful, as my Server tweets me it’s status.
Therefore I wrote the following simple shell-script:

#!/bin/bash
#CC-BY-SA 11th of March 2011 by Lx
time=`date +"%d/%b/%Y:%H:%M:%S %z"`
if [ ! -e "~/log/$1_status.log" ]; then touch ~/log/$1_status.log; fi
lastlog_on=`tail -n 1 ~/log/$1_status.log | grep ONLINE`
lastlog_off=`tail -n 1 ~/log/$1_status.log | grep OFFLINE`
control=`ping -c 3 -W 1 google.com | grep "[1-3][[:space:]]\(packets received\|received\)"`
if [ -n $1 ]; then
 echo "Sending pings to "$1
 pong=`ping -c 3 -W 1 $1 | grep "[1-3][[:space:]]\(packets received\|received\)"`
 echo "Ping result: "$pong
 if [ -n "$pong" ]; then
  echo "Host "$1" is online"
  if [ -z "$lastlog_on" ]; then
   echo $time" "$1" status ONLINE" >> ~/log/$1_status.log
   echo "Host "$1" is online" | twidge dmsend twitteraccount
  fi
 elf [ -n "$control" ]; then
  echo "Host "$1" is offline"
  if [ -z "$lastlog_off" ]; then
   echo $time" "$1" status OFFLINE" >> ~/log/$1_status.log
   echo "Host "$1" is offline" | twidge dmsend twitteraccount
  fi
 else
  echo "Network down"
 fi
elif [ -z $1 ]; then
 echo "Usage: $arg0 hostname|ip"
fi
exit;

Then I use a cronjob accordingly:

*/5 * * * * sh ~/path/to/shellscript.sh foo.bar.baz > /dev/null 2>&1

You can easily also tweet the server uptime, load or whatever 😎

uptime | twidge update twitteraccount

Have phun!

Bypassing the Chinese Firewall

March 11th, 2011 No comments


There are multiple ways to bypass the Chinese Firewall, using VPN, anonymous browsers or Tor. But I prefer to use the most simple way, which for me is using an ssh tunnel.

host:~user$ ssh -D 8888 login@myserver.org

(There is also a nice GUI for those who are not familiar with the command line.)

Then I configure my system preferences to use the socks proxy on 127.0.0.1:8888, which can also be done in Firefox Network settings. (see screenshots)

As the Chinese Government also tries to block external sites, such as Youtube and Openleaks, by filtering DNS requests, it’s necessary to filter this too. One could e.g. point them to 127.0.0.1 (in system preferences) and then send through another ssh tunnel:

host:~user$ sudo ssh login@myserver.org -L 53:127.0.0.1:53

(sudo because 53 is a privileged port.)

But actually it’s easier by just hacking the firefox configuration:

Luckily, with SOCKS5 Firefox can control which side of the proxy handles DNS lookups. By default, it does the lookups locally resulting in the scenario above. To change this, set network.proxy.socks_remote_dns = true in about:config. This makes the SOCKS proxy more like a regular proxy, where DNS is handled by the remote end of the tunnel.

… or one can install iodine and tunnel all DNS requests accordingly.

Have phun!

Losar 2138 Tashi Delek

March 5th, 2011 1 comment

Losar Tashi Delek! Happy new year 2138!

 

“As the light of this New Year blazes
With excellent virtue and happiness
May these dependently arising appearances inseparable from emptiness,
Bring benefit and prosperity in all the worlds there are,
May the light of auspiciousness always blaze bright”

Close your eyes

March 2nd, 2011 No comments

AUGEN ZU!

Von Daniel Morgenthaler. Aktualisiert am 02.03.2011

Eine Ausstellung in der Shedhalle zeigt Kunst, die sich mit Schlaf und Träumen auseinandersetzt.

Vor laufender Kamera schlummern? Kein Problem für den Medienkünstler.

Konsequenterweise müsste die Shedhalle ab Freitag immer nur nachts geöffnet sein. Nicht nur ist das Thema der neu eröffnenden Ausstellung «Dump Time» der Schlaf; in vielen der rund 12 von den Kuratorinnen Anke Hoffmann und Yvonne Volkart zusammengestellten künstlerischen Positionen sind die Protagonisten auch tatsächlich am Schnarchen.

Es würde allerdings sehr schlecht in unsere Zeit grsssierender Schlaflosigkeit passen, wenn sich die Künstler mit diesen Arbeiten schlicht ausruhen würden. Entsprechend schläft der junge Zürcher Medienkünstler in seinem Video nicht einfach nur, er analysiert die gefilmte Bettruhe und die im Schlaf gemachten Äusserungen danach auch gleich selbst. Man kann ja nie wissen, ob man nachts nicht Sinnvolleres von sich gibt als am Tag – und wer möchte das schon verpassen?

Eine andere Variante der Auseinandersetzung mit dem Schlaf und seinen (Alb-)Träumen verfolgt die russische Künstlerin Gluklya: In Workshops arbeitet sie mit Asylbewerbern deren nächtliche Fantastereien auf und bringt diese Ende März tänzerisch zur Aufführung. Bei aller Unberechenbarkeit von Träumen: Sicher ist schon mal, dass die Befürworter der Ausschaffungsinitiative hierbei keine schöne Rolle spielen werden.

Anders als bei Antener und Gluklya, die wenigstens noch davon ausgehen, dass Schlaf auch in prekären Situationen möglich ist, kommt die Hauptfigur im Video von Stefan Panhans nicht zur Ruhe: Auf Heuballen liegend und grotesk geschminkt, steckt sie in einem dunkelroten Schlafsack. Das könnte ja ganz gemütlich sein, würde sie nicht lautstark Entspannungsparolen ausstossen – was natürlich alles andere als relaxend wirkt. Was wohl erst passiert, wenn die schräge Larve geschlüpft ist? Vielleicht erfahren wir es an der Eröffnung am Freitag. Oder müsste es jetzt Freinacht heissen?

Vernissage: Fr 4.3., 19 Uhr, bis 15.5. Mi–Fr 13–18 Uhr, Sa/So 12–18 Uhr Shedhalle Zurich

Categories: Art, Science, ZHdK Tags:

Internet dialin for Libya

February 21st, 2011 No comments

Rop Gonggrijp offers a dialin service (xs4all): “Use your modem to dial +31205350535, username xs4all password xs4all.”

انترنت مجاني وغير مراقب في ليبيا اتصال بالرقم

username xs4all
password xs4all
+ 31205350535

Telecomix is also providing a similar service. (See below)

P.S. Such services should actually globally and freely be offered by the UNHRC (United Nations Human Rights Council)!!

O2

February 20th, 2011 No comments

Categories: Technology Tags: , ,

Miaou

February 19th, 2011 No comments

Pixelfari

February 17th, 2011 No comments

Pixelfari is a 8-bit Browser which might give your website a litte “arty” retouch. 🙂

Try it: Download Pixelfari 1.0

Here is the button to implement on your website, in case it is “Pixelfari optimised”.

Categories: Art, Free Software, Technology Tags: , ,

Lonely Valentine’s day in Paris

February 14th, 2011 No comments

Categories: Culture Tags: , , ,

Geek music heaven

February 10th, 2011 No comments

host:~ user$ cat toccata > /dev/floppy

[Update]
Here’s Barbara Dennerlein’s Jazz version of toccata.

Categories: Art, Culture Tags: , ,