Tuesday, August 12, 2008

It's all about the process

It's all about the process. Maybe IDEO is so great, because of their process. Viasat is great, because of VGate, their process. Processes are like investments. You pay more now, but reap greater benefit down the road.

Sunday, July 27, 2008

Backing up ArchLinux to USB Thumb Drive

I have to say, I'm loving ArchLinux. In my opinion, it has wonderful package management, a rolling-release model (you never have to download the latest ISO to upgrade), wonderfully community docs and support, etc.

But, like any distro, it's required a few tweaks to get things working properly with my particular laptop, an Everex StepNote ST5340T. Over the last few months, I've made tweaks here and there, and if I had to start over with a fresh install, I'd be sad. In particular, the laptop's wireless and suspend features needed tweaking to get them to work right.

This post is about backup solutions. After a little research, I came accross this site, and decided to go with dar. Here is my bash script which will backup everything (except for that which I don't want backed up) to my usb thumb drive. It's a 2GB thumb drive, and the backup takes 1.4GB. Pretty cool huh? I'm impressed.


#!/bin/bash
pacman -Scc
dar -v --alter=atime --empty-dir --fs-root / --noconf --create /media/usb/ backup08-Jul-27 -z6 -an -X "*.ogg" -X "*.avi" -X "*.mp?" -X "*.pk3" -X "*. flac" -Z "*.zip" -Z "*.tgz" -Z "*.gz" -Z "*.gzip" -Z "*.bz2" -Z "*.bzip2" -Z "*.mov" -Z "*.rar" -Z "*.jar" --prune lost+found --prune media --prune proc -- prune mnt --prune sys --prune home/gdw/music --prune home/gdw/pics

Friday, July 25, 2008

Dynamically getting fields from a Django Model Object

Response to my question on #django> gdw2: see get_* in django.db.models and then see model._meta.fields

> Package._meta.fields

... does the trick

Everex Suspend in Linux

I got my Everex StepNote ST5340T to suspend today in ArchLinux! Yea! Suspending is a very important feature, especially when you're on the road, because it allows you to turn the computer off and on quickly. Here is my little script:

#!/bin/bash
modprobe -r rt73usb
sleep .7
modprobe -r ehci_hcd
sleep .7
modprobe -r ohci_hcd
sleep .7
modprobe -r rt73usb
sleep .7
echo "mem" > /sys/power/state
sleep .7
modprobe rt73usb
sleep .7
modprobe ehci_hcd
sleep .7
modprobe ohci_hcd
sleep .7
modprobe rt73usb
sleep .7
/usr/bin/netcfg2 -a
sleep .7
/usr/bin/netcfg-auto-wireless wlan0

I'm confident that it could be optimized greatly, but it works for now. If you have any questions, send and email or post a comment.

Tuesday, July 08, 2008

svn commit all new files

svn add * --force
svn commit -m "blah blah blah"

Thursday, June 26, 2008

Dropping all Tables in a DB

mysqldump -u pykillian --add-drop-table --no-data pykillian | grep ^DROP | mysql -u pykillian pykillian

Wednesday, May 28, 2008

Deleteing all of Vim's swap files

Every once in a while one of my ssh sessions will timeout and when I log back in and use vim, it complains about all my leftover swap files.

Problem solved:

find ./ -name \*.swp | xargs rm


This recursively removes all swp files!

Pyjamas