howto, hack

I invented a word today

Tagged:  •    •  

disasswimble (v) To take a portable elecronic device apart so that it might dry after an unfortunate dunking

Thanks to @jerith for formulating the definition and the true life incident that lead to us discussing it.

disasswimble (v) To take a portable elecronic device apart so that it might dry after an unfortunate dunking.

Dell Vostro A860 NIC and Wi-Fi issues in Ubuntu (Intrepid)

Tagged:  •    •    •    •  

Soon after I had installed Ubuntu 8.10 on my new laptop I realised that something was not well with the networking.

XML processing in Elisp

Tagged:  •    •    •  
Recent versions Emacs has built in xml support, and there are libraries available that give you DOM and even XPath capabilities. I've started experimenting with it as I want to process Eclipse Workspaces. Ideally, I should be using XPath, but that has too many dependencies for now (it depends on parts of Semantic). So, using the xml-parse examples on EmacsWiki.org, here is some simple code to get a the "userid" attibutes from all the "to" elements of the following xml data:
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <note topic="weekend plans">
  3. <to userid="1">Tove</to>
  4. <from userid="2">Jani</from>
  5. <heading>Reminder</heading>
  6. <body>Don't forget me this weekend!</body>
  7. <to userid="3">Bob</to>
  8. <from userid="4">Sammy</from>
  9. <heading>Alas!</heading>
  10. <body>A new week!</body>
  11. </note>

Compiling Emacs

Tagged:  •    •    •    •  

So, I'm back to trying to compile emacs-nt again, having discovered that the required W32 headers are in fact conveniently supplied by Mingw (albeit in a different package). Now I'm getting an "Unknown Processor" error. gcc -dumpmachine tells me I have an arm processor on my PC... perhaps this is the problem o_0

UPDATE: It turns out the Symbian SDK also provides a gcc, and this was in my path before the Mingw one. Hence the strange architecture.

Opening an image in Opera 9.5 spawns multiple tabs

Tagged:  •    •  

I recently started seeing a bizarre problem in Opera. I believe it only happened in Opera 9.5 but I may be wrong. I suspect it may also be linked to Irfanview. Basically, when ever I opened an image via the context menu, or clicked on a image link, a gazillion (ok, 10 - 20) tabs would open, trying to load something from the cache directory - yet still no image.

I found the solution to the problem yesterday, in the Opera Forums:


Seems like something got mixed up in your file type associations. Probably the best thing is to reset them all.

Emacs as an IDE

Tagged:  •    •    •  

At work we recently started using an Eclipse-based IDE. It integrates with a gdb-based debugger, but everything is very unstable and I have to constantly power-cycle the box and programmer that I'm working with.

Since I've been playing with emacs the last few months, I decided to see whether I can get the compilation and debugging working from within emacs. (pause for effect)

Yes, indeed it is possible. (applause)

Creating a Blogroll the Drupal way

Tagged:  •  

My shiny new blogroll is built using the Drupal modules Content Construction Kit (CCK) and Views. The CCK lets you create new "content types" very easily and without writing a line of code (which is a good thing in this case).
Everything in Drupal is/should be a node. This post is a node, of the type Blog. CCK lets you set up a collection of data fields into a new node type or add custom fields to existing node types.

Bluetooth/GPRS setup

Tagged:  •    •    •  

How to set up GPRS modem over bluetooth

Step 1: turn on bluetooth on your phone

Step 2: start bluetooth on your box (as root)
# /etc/init.d/bluetooth start

Step 2.5: (not sure whether this is actually necessary but it won't hurt)
$ kbluetoothd

Step 3: Pair your computer and your phone in the usual way

Step 4: find your phone's id and DUN channel
# sdptool search DUN
Inquiring ...
Searching for DUN on 00:17:4B:19:17:01 ...
Service Name: Dial-Up Networking
Service RecHandle: 0x10007
Service Class ID List:
"Dialup Networking" (0x1103)

Beaming files across a network

Tagged:  •  

The following script copies files given in a text file. It preserves the tree structure, and copies it to a base directory. It uses a nifty mkdir-like function that takes a lot of the nitty-gritty out of the process.

import os
import os.path
import shutil

def makepath(path):

""" creates missing directories for the given path and
returns a normalized absolute version of the path.

- if the given path already exists in the filesystem
the filesystem is not modified.

- otherwise makepath creates directories along the given path

Syndicate content