Archive for February, 2008
Why yes, it is test season!
Raising my periscope for a second to bring you a screenshot from the whiteboard, while studying for a computer security test.
My alarm clock
YNet was running a story on how to use your computer as an alarm clock. Here’s what I do, for our commandline junkies
Here’s ~/bin/run_alarm.sh:
#!/bin/bash
find ~/music/ -name '*.mp3' -print0 | xargs -0 mplayer -shuffle &
MAXVOL=31
TIME=900
for (( i = 0; i <= $MAXVOL; i++ )); do
amixer set Master $i > /dev/null;
sleep `echo $TIME / $MAXVOL | bc -l`
done
This basically plays all of my MP3 files, in random order. The -print0 and -0 arguments make it a null-terminated list, as some (most) files have spaces in their names. This process is backgrounded, and the script proceeds to gradually sweep the volume from 0 to the maximum, for a more gentle wakeup
This script is basically intended for use with at. I made a little wrapper around it for my comfort:
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 [time]";
exit 1;
fi
echo /home/ohad/bin/run_alarm.sh | at $1
Nokia 6120 Classic
I’ve switched to a Nokia 6120 Classic, and I’ve switched my carrier over to Orange. I’m very happy with it: The price is right, at 0 NIS a month (if your monthly bill adds up to over 100 NIS without it, which it does). It’s very small, but has a nice screen and a respectable 2 megapixel camera. It’s “3.5G”, which means it has a very fast internet connection (I’ve clocked over 50kbyte/sec), and the Symbian S60 operating system lets me use it well – it comes with a very, very nice webkit-based browser and RSS reader, and a fast GMail client is a few clicks away.
Another nice feature is the built-in MP3 player – which is actually made relevant due to the micro-SD support and included 1GB SD card. The device has a standard USB connection (cable included, but it’s an ordinary Mini-to-A cable), and has a Mass Storage Device mode, so it works well with any OS. It can also automatically text-to-speech the name of the caller (or dial by voice recognition, which works remarkably well), which is handy when listening to MP3s.
I’ve only had two problems with it so far – first, when viewing a long web page (on wikipedia, specifically), it gave an “out of RAM” message and rebooted. I’m curious as to whether there’s a simpler, non-CSS version of Wikipedia, or a way to get the phone to ignore the CSS – this will probably save on RAM. Another problem I had was that the vibration feature didn’t work until I rebooted it – but this no longer seems to occur.
I wonder how well puTTy would work on this…
Egged Getter 0.1
Here’s a little something I’ve been messing with: A simple fetcher script for the Egged (Israeli bus company) site. I’ve made a deskbar applet which uses it, which was fun to do
(I’m looking for other cool ideas to implement as deskbar applets)
You can get it at http://lutzky.net/files/egged_getter. The readme file includes installation instructions (…which involve placing the two included scripts in ~/.gnome2/deskbar-plugin/modules-2.20-compatible/.
There’s also a git repository here: http://git.lutzky.net/?p=ohad/egged_getter.git. I don’t think I’ve mentioned git on the blog before… It’s freaking awesome. It made me really despise subversion
. Besides the abundance of information on the main site, there’s an excellent (and very amusing) talk by Linus about it. Also, I’m giving a talk about it in Haifux – this coming Monday (February 4th), the Taub building of the Technion, room 6, at 18:30.
