ts2webviewer
Thursday, 27. November 2008 16:56 - daniel - Other - 0 Comments
I got fed up with my old Teamspeak2 web viewer, and since I wanted to try some stuff I wrote a new version myself. I wanted to test jQuery a bit and tried to d as much as possible with objects in php.
The ts2webviewer is still missing some things, like hiding channels, showing verbose information about the server, channels and clients and I'd like to extend the admin interface to allow more commands then just kick players, but if you want, you can get a sneak peak at the code here: ts2webviewer-0.0.1.tar.bz2
Tags, here, now
Wednesday, 26. November 2008 16:54 - daniel - Other - 0 Comments
I never felt quite happy with the current categories. Whenever I wrote an entry, I had to decide what category it should be. But whatever I had chosen, it never felt 100% right. Thats why I wrote a tags plugin for yabs.
It's not really ready yet, and some features like automatic tag suggesting are missing, but it works quite well now. And while writing the plugin I also squashed some minor bugs in yabs. If I ever get around to finish the plugin I'll release it to the general public, but for now it will only run on this blog. Sorry guys ;).
Do I have to understand this
Monday, 24. November 2008 20:44 - daniel - Other - 0 Comments
Well, this guy obviously isn't dumb or anything, but he is still an idiot. And while he writes all that stuff, I just don't know whey he doesn't take the time to run his site properly. If he wants to piss of people, then do it right, but doing something so badly as this is pathetic. Even his previous attempts were better than this right now.
Thankfully, his identity is more or less known, and if he continues this, he will get a slap on the head. Again.
Note: The site is now offline, but I guess he will return sooner or alter with something similar.
Huawei E160 and Linux
Saturday, 27. September 2008 10:40 - daniel - Other - 7 Comments
I recently got a Huawei E160 3G modem and use it on my Asus EEE 701 for mobile browsing. Since the E160 has two modes. In the default mode it acts like a read only USB drive, in the second mode, the modem is available. To change between these modes, you need a tool called usb_modeswtich.
The solution I'm describing here works on my EEE with fluxflux (a PCLinuxOS-remaster). It should work with other distributions too, but I havn't tested it. This solutions is based on Thomas Schönhütl's post about how to get the E169 working with fluxflux (german).
First, we need to get usb_modeswitch and compile it. You need libusb-dev (or libusb-devel on some distros) installed for this.
Now install ivman. Ivman is a daemon to auto-mount and manage media devices. We'll use ivman to run usb_modeswitch when the E160 is connected. I tried to do this with udev but failed. If anyone is successfull by doing it with udev, let me know.wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-0.9.4.tar.bz2
tar -xjf usb_modeswitch-0.9.4.tar.bz2
cd usb_modeswitch-0.9.4
./compile.sh
cp usb_modeswitch /usr/local/bin/
Add ivman to you autostart. In ubuntu you can do this by going to System->Preferences->Sessions and adding a new Startup Program.apt-get install ivman
ivman
Now, lets adjust the ivman config file. Open $HOME/.ivman/IvmConfigActions.xml and add this befor </ivm:ActionsConfig>
<!-- Change Huawei E160 Mode -->
<ivm:Match name="hal.storage.physical_device" value="/org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial_if0">
<ivm:Option name="exec" value="xterm -e $HOME/.e160.sh" />
</ivm:Match>
Now create a file named .e160.sh in you home folder and open it with you favourite text editor. Paste this to the file
!/bin/bash
if [ -z "`/bin/ls /dev/ttyUSB0`" ]; then
if [ "`/usr/sbin/lsusb | grep 12d1 | cut -d : -f3 | cut -b -4`" = "1003" ]; then
/usr/local/bin/usb_modeswitch -v 12d1 -p 1003 -d 1
/usr/local/bin/usb_modeswitch -v 12d1 -p 1003 -H 1
fi
fi
Save the file and make it executable.
chmod +x .e160.sh
Restart ivman (or reboot) and the next time you connect you E160 3G modem, it should be switched to the correct mode automatically. 4chan download script
Sunday, 31. August 2008 19:44 - daniel - Other - 20 Comments
Downloads all the images from a 4chan image thread. I will probably regret downloading anything from 4chan, but that's not my problem.
Usage: 4chandl <4chan thread url>
Download the script
#!/bin/sh
if [ "$1" = "" ]; then
echo "Usage: `basename $0` <4chan thread url>"
exit 1
fi
echo "4chan downloader"
echo "Downloading untill canceled or 404'd"
LOC=$(echo "$1" | egrep -o '([0-9]*).html' | sed 's/\.html//g' )
echo "Downloading to $LOC"
if [ ! -d $LOC ]; then
mkdir $LOC
fi
cd $LOC
while [ "1" = "1" ]; do
TMP=`mktemp`
TMP2=`mktemp`
wget -O "$TMP" "$1"
if [ "$?" != "0" ]; then
rm $TMP $TMP2
exit 1
fi
egrep 'http://(img|cgi).4chan.org/[a-z0-9]+/src/(cb-nws/)?([0-9]*).(jpg|png|gif)' "$TMP" -o > "$TMP2"
cat "$TMP2" | sed 's!/cb-nws!!g' > "$TMP"
wget -nc -i $TMP
rm $TMP $TMP2
echo "Waiting 30 seconds befor next run"
sleep 30
done;