Dienstag, September 11, 2012

Remote switch FMT IP Network Socket via HTTP / FMT Netzwerksteckdose per HTTP schalten





Product:

Get state request
curl -q http://${LAMPHOST}/status.xml 2>/dev/null

XML response
0
nicht angeschlossen

Get state request
curl -q http://${LAMPHOST}/status.xml 2>/dev/null | sed -ne 's/.*\(.*\)<\/led1>.*/\1/p'

boolean result
0

Toogle state request

Script to switch on and off
#!/bin/bash
#
#
LAMPHOST="YOUR.LAMP.IP.ADDRESS"

if [ "$1" == "0" ] || [ "$1" == "1" ]; then
  LAMPTARGETSTATE=$1
  LAMPSTATE=`curl -q http://${LAMPHOST}/status.xml 2>/dev/null | sed -ne 's/.*\(.*\)<\/led1>.*/\1/p'`
  
  # you can only toggle the state :-)
  if [ "$LAMPSTATE" != "$LAMPTARGETSTATE" ]; then
  fi
  exit 0
fi
echo "Usage: lamp.sh [0,1]"
exit 1

Thank's to Oliver Otzen for his great reverse engineering and script.

Labels: , , , , , , ,

Sonntag, Januar 23, 2011

Use your Mac for AirPlay

The little tool "AirPlayer" enables your Mac as an Airplay speaker to stream audio or video from any iOs device to.

Labels: , , ,

Mittwoch, November 24, 2010

QuickLook for Source Code




Download from http://code.google.com/p/qlcolorcode/ and copy to ~/Library/QuickLook/

Works good for Java, Groovy is just plain Text.

Samstag, Februar 28, 2009

Use System Proxy Settings in Firefox

Finaly it works! Firefox now uses my network location specific proxy settings as Safarie does. Thanks to the litle extension by Ilya Voronin!

http://systemproxy.mozdev.org/installation.html

Mittwoch, Januar 30, 2008

Keyword-Suche in Safari

Wer's im Firefox einmal kennen gelernt hat will nie wieder ohne: Suchanfragen für verschiedenste Dienste können mittels Keyword-Search sehr schnell aus der Adressleiste des Browsers heraus abgesetzt werden. 

Im Beispiel wir das Wort "Müßiggänger" bei dict.leo.org direkt aus der Adressleiste heraus  nachgeschlagen:


Das SIMBL Plugin keywurl ermöglicht es, in den Einstellungen von Safari festzulegen welche Such-Anfrage zu einem keyword ausgeführt werden soll. 

Leo kann z.B. mit folgender Query angefragt werden:
http://dict.leo.org/?lang=de&lp=ende&search=@@@
Dabei werden die drei '@' durch die Benutzereingaben (hier Müßiggänger) ersetzt.

Mit ähnlichen Suchen können auch Jira, Wiki's, etc abgefragt werden.

Viel Spass !

Donnerstag, Dezember 20, 2007

Prevent Java Apps to show up in the Dock

As I found in this blog, you can prevent some java applications from appearing in the dock.
E.g. if you start up tomcat from maven / Eclipse you always get an "ugly" application icon.

You can specify the property 'java.awt.headless=true' on the command line / eclipse wtp execution settings to avoid the icon.

java -Djava.awt.headless=true ...



Montag, Dezember 17, 2007

QuickLook into compressed files

With the quick look generator from Robert Rezabek you can now quickly look into jar, tar, tgz, zip and many other compressed files just by activating the Mac OS 10.5 Leopard feature "QuickLook".

http://macitbetter.com/BetterZipQL-1.1