Nov 5 2009

Whole bunch-o-stuff

I got a whole bunch of stuff today. I got the Star Trek Collectors Edition DVD with an Enterprise model, I got a batch of Chris Hülsbeck CDs from SynSoniq and there was a sale at work were they got rid of old rental DVDs and blu-rays.

The assembled Enterprise

The assembled Enterprise


Nov 4 2009

Validating email addresses in MySQL with regular expressions

Stand back everyone! I know regex!

I just created a function in MySQL that attempts to validate an email address with the use of regular expressions. Continue reading


Oct 17 2009

Viggo in his new sofa

Viggo in his new sofa

After arriving at my parents house I found that a sofa has been placed in my old room and that Viggo was is fond of it (it is the only sofa he is allowed to lay in).


Oct 16 2009

Great sunrise

This is what greeted me this morning. Looks like the sky in on fire (exclamation mark).


Oct 5 2009

Data center upgraded

I now have a 800VA APC UPS in my data center (erhm). As always, the cable management could be better but at least it is all on a board.

Switch, Modem, Router and UPS

Switch, Modem, Router and UPS


Sep 9 2009

Many nines this day

This day is the ninth day in the ninth month of year nine this millennia. I took this screenshot on the ninth second on the ninth minute in the ninth hour. Numerologists rejoice!

090909090909


Aug 31 2009

Really quick boot

I’ve been setting up a new server for my parents and boy is it fast. And by fast I mean fast bootup. This untweaked server does it from power up to login prompt in just over 16 seconds. So I’ve stripped a few services I didn’t need but the important ones are there; acpid, crond, rsyslog, sshd and something called udev-post


Aug 14 2009

Auto detecting monitors in Linux

When using an external monitor to my laptop I have set my X to enable TwinView and have the larger external display be primary display left of the laptop display. But when I am away from home and does not have external monitor connected the nv driver does not detect that and still set up TwinView as before leaving much of the desktop out of display. To remedy this I have made two xorg.conf, one for single display and one for dual.

I have copied these manually before when I’m switching. Now I have something slightly better. I start X, run xrandr, capture its output and copy one of the configs depending on what’s in the output. This is how I do it

rm -f /tmp/xrandr /tmp/nullconf
/usr/bin/xinit /usr/bin/xrandr -q -- /usr/bin/X -config /tmp/nullconf -quiet >/tmp/xrandr 2>/dev/null
if grep -q '^DVI.* connected' /tmp/xrandr ; then
cp -f /etc/X11/xorg.conf.dual /etc/X11/xorg.conf
else
cp -f /etc/X11/xorg.conf.single /etc/X11/xorg.conf
fi
rm -f /tmp/nullconf

My external monitor is detected as a DVI and the internal as LVDS


Aug 8 2009

Sunburn

If I could offer you only one piece of advice; Wear sunscreen.

Got a bit sunburned today while trying to catch the last sun rays (death rays?) before my vacation is over.

Last year I got virtually no tan at all because of the weather and suffered from sleepyness the rest of the autumn and winter.


Aug 3 2009

Upgraded harddrive with encrypted LVM

My HP laptop with 160GB harddrive was getting full and I wanted to upgrade it to a bigger one. Found that 2.5″ 500GB was relatively cheap so I bought one and detailed the procedure of upgrading with all data intact. I bought a 2.5″ USB-SATA chassis as well for the old drive to sit in. As I hit a few snags when doing this I thought it could be useful for others to read about.

Continue reading