git-svnup
My employer (or client, since I am a contractor there) uses [svn]{tag/svn}. I prefer to use [git]{tag/git}. This following git allows me to update all tracked svn branches in my git-svn repository: git config --get alias.svnup !git-config --get-regexp 'svn-remote.*url' | cut -d . -f 2 | xargs -n1 git-svn fetch The way to invoke it is to run: git svnup git-svn rebase some-remote-snv-branch You need to put that into your ~/.gitconfig like so:
reducing power consumption
I was recently talking to Jean about lowering power consumption. One of the things I do is to purge all modules when I go to battery power. Here is the script I use to remove unwanted modules. lsmod | awk '/0 *$/ {print $1}' | xargs -n1 sudo rmmod Building things as modules makes this more successful. And you have to run it a few times to get all the unused modules out. Maybe something like this would work…
Makefile template
Someone on #oclug was asking about building C programs with make. I wrote up this simple Makefile for him.
less, colourful
Make your less more pretty with these environment variables… export LESS_TERMCAP_mb=$'\E[01;31m' export LESS_TERMCAP_md=$'\E[01;31m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[01;32m' You can put these in your .zshrc or .bashrc.
irssi docs
I was indirectly pointed to these docs on [irssi]{tag/irssi}… Irssi Documentation and Resources How to Efficiently Use Irssi and Screen An Illustrated Guide to Split Windows in Irssi
qemu eats up /dev/shm
I’ve been using qemu ([with kqemu]{kqemu-install}) to run my client’s windows software, which talks to the linux driver/daemon that I am working on. Having multiple qemu instances really chews into the shared memory… and the amount available depend on how /dev/shm is mounted. # df /dev/shm Filesystem Size Used Avail Use% Mounted on none 2.0G 713M 1.4G 35% /dev/shm On Debian you can control this via /etc/default/tmpfs SHM_SIZE variable….
git-clean in svn land
Some things are easier in [git]{tag/git}. For example to nuke all changes and only keep files that are tracked by git I would run: git-clean -d -x git-checkout -f In [svn]{tag/svn} it’s a bit more involved, but not impossible: svn status --no-ignore | awk '{print $2}' | xargs rm -rf svn revert -R . svn update For extra fun… the svn revert -R will actually stop on any symlinks to directories. Fun!
ipw2200 not working
Err! I recently nuked and paved over my X41, with debian/lenny. When I wanted to use the wireless I was greeted by: ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.0kmprq ipw2200: Copyright(c) 2003-2006 Intel Corporation ACPI: PCI Interrupt 0000:04:02.0[A] -> GSI 21 (level, low) -> IRQ 23 ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection ipw2200: ipw2200-bss.fw request_firmware failed: Reason -2 ipw2200: Unable to load firmware: -2 ipw2200: failed to register network device ACPI: PCI interrupt for device 0000:04:02.0 disabled It turns out that I have not done any wireless twiddling recently and forgotten that I had to get the firmware before things started working again.
git slides updated
I recently gave my [git talk]{20070329011735} for a client. I had about 3.5 hours, and found that was quite adequate to relay all the information. My slides are available in PDF and the magicpoint source.
unpopular debian packages on my system
Using the ept-cache utility advertised on joey’s blog I was able to have a look at some packages on my site that are likely not on your system. To get packages of inverse popularity which you have installed run: ept-cache search -t clean -s t- | less Of interest are the following.