Archive for the ‘Uncategorized’ Category

FreeBSD byobu snack module fix:
portmaster -m WITH_PYTHON=yes devel/newt

Explanation: somebody decided that compiling python-newt by default was wrong, and broke the byobu package in the process. I’m a new FreeBSD user, so this was pretty annoying to fix. It kept bothering me that byobu-config was broken, and I eventually went into the ports collection makefile to find that there was a WITH_PYTHON option in there all along.

Of course, all the linux-based system monitors found in byobu, xmobar, etc. are broken in FreeBSD.

BTW, knowing the answer makes it much easier to find. :) (already found it twice)

Read Full Post »

I’m one of the unlucky people living in far-away places that don’t get Twitter updates via SMS. Recently, Twitter activity has increased among some of my friends, so I wanted to get updates without having to remember to visit the site (I’m lazy that way).

Long story short, the “friends_timeline” RSS feed that twitter offers is password protected, whereas Google Reader doesn’t support passwords (and even if it did, I wouldn’t want to put my Twitter password there). So my idea was to create a non-password protected proxy page that takes care of entering the password and returning the contents of the feed. Below is a simple PHP script that does just that. You can put it on your web server and subscribe to it using your choice of RSS reader, no passwords required.

// A simple proxy to fetch password-protected pages on services that don't
// support it. Example: twitter feed on google reader
// based on:
// http://developer.yahoo.com/javascript/samples/proxy/php_proxy_simple.txt
// Author: Jason Levitt
// December 7th, 2005
// Modifications: Ehud Meiri, Feb 2009

$url = 'http://USERNAME:PASSWORD@twitter.com/statuses/friends_timeline/NUMBER.rss';

// Open the Curl session
$session = curl_init($url);

// Don't return HTTP headers. Do return the contents of the call
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

// Make the call
$xml = curl_exec($session);

echo $xml;


To use it for your account, change the “$url” line to match your details (you can find your NUMBER in the “RSS feed” link here).

Note that this solution is insecure (esp. on shared machines), as the password is stored in plaintext in the script and anybody who can read the script source can know your password. Be careful.

Read Full Post »

I’ve just purchased a new toy: the Wacom Bamboo tablet. Without any modifications, the tablet behaves in X like a (very slow) touchpad.
Luckily, kernel and xorg drivers are available, though support is not mature yet (I was expecting some gnome configuration tool).

Installing a Wacom Bamboo on Debian testing:
A. Install the following packages:
Packages that should be already on your system:
1. xserver-xorg-input-wacom (version
2. linux-image-2.6.24-1-686 (or possibly 2.6.23, 2.6.22, YMMV)

Packages that you probably don’t have yet:
3. wacom-tools (version

B. Tweak your /etc/X11/xorg.conf:
1. Add the following sections.

Section "InputDevice"
        Identifier      "stylus"
        Driver          "wacom"
        Option          "Device"                "/dev/input/wacom"
        Option          "Type"                  "stylus"
        Option          "USB"                   "on"

Section "InputDevice"
        Identifier      "eraser"
        Driver          "wacom"
        Option          "Device"                "/dev/input/wacom"
        Option          "Type"                  "eraser"
        Option          "USB"                   "on"

Section "InputDevice"
        Identifier      "cursor"
        Driver          "wacom"
        Option          "Device"                "/dev/input/wacom"
        Option          "Type"                  "cursor"
        Option          "USB"                   "on"

Section "InputDevice"
        Identifier      "pad"
        Driver          "wacom"
        Option          "Device"                "/dev/input/wacom"
        Option          "Type"                  "pad"
        Option          "USB"                   "on"

2. Change the following section to look something like this:

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        InputDevice     "stylus"                "SendCoreEvents"
        InputDevice     "eraser"                "SendCoreEvents"
        InputDevice     "cursor"                "SendCoreEvents"
        InputDevice     "pad"                   # no core events

C. Configure the touch ring to act like a mouse wheel (i.e. scrolling).
1. I put the configuration in the in file /etc/X11/Xsession.d/80wacom-config_scrollpad, for lack of a better place.
Its contents:

xsetwacom set pad AbsWDn "5"
xsetwacom set pad AbsWUp "4"

D. That’s it.

More documentation and options here.

Read Full Post »

Robert X. Cringley writes:

We’re talking about tin whiskers, single crystals that mysteriously grow from pure tin joints but not generally from tin-lead solder joints. Nobody knows how or why these whiskers grow and nobody knows how to stop them, except through the use of lead solder. Whiskers can start growing in a decade or a year or a day after manufacture. They can grow at up to nine millimeters per year. They grow in any atmosphere including a pure vacuum. They grow in any humidity condition. They just grow. And when they get long enough they either touch another joint, shorting out one or more connections, or they vaporize in a flash, creating a little plasma cloud that can carry for an instant hundreds of amps and literally blow your device to pieces.

Read Full Post »

Too Many Bookmarks

TMB (Too Many Bookmarks) is my homepage script. It is intended to give quick access to my most frequently used bookmarks, from any computer I may be using. I used to have a wiki page that did this, but now TMB allows me to easily add bookmarks, assign their category, and (roughly) order them.
It is very very basic, but it works, it’s fast, and I love it.

Requirements: PHP 5.2 with SQLite 3

Download it at the TMB page.

BTW Instapaper is a great tool for bookmarking pages that you want to read later. You can flag pages as read/unread, add pages to your list with a press of a button (I might add this to TMB), and the registration is really simple.

Read Full Post »

Older Posts »