Archive for February, 2009

Instant Storage 1

Here’s one of my favorite PHP ‘hacks’: when I’m whipping up a quick script that needs a place to stash some persistent data, but don’t feel like coming up with a database structure, or doing anything remotely approaching a real solution, I instead stuff it into a “static” session. By static, I just mean that I set the session ID to a static value, so I’m always pulling the same session. Instant data store.

session_id('stash-stuff-here');
session_start();
$_SESSION['stuff'] = $w00tz;

(Another quick and dirty approach would be serializing an array into a local file… oh, wait, I just recreated the default PHP session handler. ;))

Tango Color Scheme for XFCE Terminal 23

At work I run XFCE; at home I run Ubuntu. Yesterday I noticed that the default Ubuntu color scheme for Gnome Terminal was really nice — called the “Tango” palette — and wished I could have the same at work. I already run the Tango icon theme, so it’d fit in nicely.

Turns out, the default XFCE terminal supports color schemes, too; I just had to stuff the correct color values in. I searched around a little bit, but couldn’t find anyone’s config to steal, so I copied and pasted the values in — one by one. To save you the same pain, open up ~/.config/Terminal/terminalrc, find the lines that all start with Color, and replace them with:

ColorForeground=White
ColorBackground=#323232323232
ColorPalette1=#2e2e34343636
ColorPalette2=#cccc00000000
ColorPalette3=#4e4e9a9a0606
ColorPalette4=#c4c4a0a00000
ColorPalette5=#34346565a4a4
ColorPalette6=#757550507b7b
ColorPalette7=#060698989a9a
ColorPalette8=#d3d3d7d7cfcf
ColorPalette9=#555557575353
ColorPalette10=#efef29292929
ColorPalette11=#8a8ae2e23434
ColorPalette12=#fcfce9e94f4f
ColorPalette13=#72729f9fcfcf
ColorPalette14=#adad7f7fa8a8
ColorPalette15=#3434e2e2e2e2
ColorPalette16=#eeeeeeeeecec

Save the file, and revel in your new colors!

Tango Color Theme for XFCE Terminal