Blogs

Linux one liner: Disable a module (blacklist)

sudo sh -c 'echo install module_name /bin/true >> /etc/modprobe.d/personal_blacklist'

This line will create (or append) a blacklisting rule for module_name in the file /etc/modprobe.d/personal_blacklist. Remove or edit this file to lift the ban again.

Workes with: Ubuntu 8.10 (jaunty)

Recoding files to Ogg Vorbis using gst-launch in a shell script

Here is a stupid, small but working recode script. It recodes flac, mpc, mp3 and m4a to Ogg Vorbis using gstreamer, after recoding the files are placed in the 'old' directory. Really simple, but if you have a large collection of mp3 files you want to recode into low quality Ogg Vorbis files, here is one way to do it.

Linux one liner: Convert scalable vector graphics (SVG) to PNG with gstreamer

I don't need to say more then the title, right? You can do this with convert from the ImageMagick package, but doing it with gstreamer was news to me. Here is the code to svg2png with gstreamer:

gst-launch filesrc location=intput.svg ! gdkpixbufdec ! pngenc ! filesink location=output.png

I used this in a Makefile rule:
%.png: %.svg
gst-launch filesrc location=$< ! gdkpixbufdec ! pngenc ! filesink location=$@  2>&1

Open up DAAP for the local networks using ufw

To open up your ufw firewall for DAAP on the local network (ipv4 rfc 1918), you can issue the following:

sudo ufw allow proto tcp from 10.0.0.0/8 to 10.0.0.0/8 port 3689
sudo ufw allow proto tcp from 172.16.0.0/12 to 172.16.0.0/12 port 3689
sudo ufw allow proto tcp from 192.168.0.0/16 to 192.168.0.0/16 port 3689

To delete them again, use the same but with "delete" just before "allow".

Sync the time from your local computer to your OpenMoko phone

Set the time on you OpenMoko phone to the time on your local computer using SSH:

ssh root@192.168.0.202 "date -s `date +'%Y.%m.%d-%H:%M:%S'`; echo `cat /etc/timezone` > /etc/timezone"

Linux one liner: turn off your screen

xset dpms force off

Works with: Ubuntu 8.10 (jaunty)

Running nmap on an OpenMoko telephone

Yeah! I've got a Neo FreeRunner. It is the first day, so I don't have anything interesting to show yet, but I couldn't help to post about it. Still to have something to show you all, I decided to nmap it.

logfish the definition

Why logfish.net? Well, I ran through the freedict dictionary and brute-forced my way to a new dictionary word with not too many letters. Also it has "log" in it, so I thought that was cool.

For historical reasons, I decided to just copy the dict.org defenition and make sure it is kept here for all to see.

Downloading MMS streams (like the ones on uitzendinggemist.nl)

In the old days, Linux fans where not able to see the M$ video streams, and although it is still a problematic format downloading it has become easier.

What you need is: gstreamer, totem-gstreamer and all the good, bad and ugly plugins for gstreamer (not sure which the mmssrc plugin is part of)

Autotrash, cleaning your trash automatically

GNOME now uses the FreeDesktop.org Trash spec. This means that simply finding and removing old files won't work, as the .trashinfo won't be removed. So I've created a small python script to solve this problem. You can now again create a cronjob to automatically remove old files from the trash.

The new project page: http://logfish.net/pr/autotrash/
Download a snapshot from: http://git.logfish.net/autotrash.git
To get just the script, follow this link:
http://git.logfish.net/gitweb.cgi?p=autotrash.git;a=blob_plain;f=autotra...

Syndicate content