Living Code

Living Code is Dethe's blog for talking about code, life, and all the rest.

Black Lives Matter. Defund the police. Free Gaza. End all Genocides.

Dethe Elza • Apr 10, 2008 • Less than a minute read

Meme du jour

Just for fun, and because I’m trying out two things:

  1. Using Ecto for posting again
  2. Blogging more often
Here are my results from the latest craze:
$ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s\n",a[i],i}}'|sort -rn|head

139 ls
87 cd
54 python
43 /usr/bin/python
38 less
21 vim
16 clear
12 mate
11 rm
10 ssh
The first python is the one I built from source so I can include it in applications packaged with py2app, the second is the built-in python for Leopard. Both are version 2.5. The mate program is used to open files in TextMate from the command line.  Read →

Dethe Elza • Apr 10, 2008 • Less than a minute read

Captain Ordinary

I want to create a new superhero.  Read →

Dethe Elza • Mar 31, 2008 • Less than a minute read

Saving PNG from PyGame

The latest version, 1.8, of PyGame can save PNGs directly from a Surface: pygame.Image.save(mySurface, 'myimagefile.png'). But what if you want to support an older version of PyGame, such as the one available for the N800 or the XO? Well, assuming you have access to the Python Image Library, you can use that:  Read →