wmii+ruby xlock action
I use xscreensaver and like to lock my display when I leave my computer. Here is a snippet from my wmiirc-config.rb file that adds an xlock action to the Alt-a action menu. plugin_config["standard:actions"]["internal"].update({ 'xlock' => lambda do |wmii, *args| system("xscreensaver-command --lock") end }) I start my xscreensaver in the .xsession file: /usr/bin/xscreensaver -nosplash & … before launching wmii.
cloning xterms in wmii+ruby
I have recently added a few things to by wmii+ruby configuration that I wanted to share. These are: start a program in a given view from bash prompt (authored by Dave O’Neill) start a program in a given view using Alt-Shift-p (authored by Jean Richard) start an xterm in a given view using Alt-Shift-Return cache directory changes in a view, start an xterm in the view’s last directory using Alt-Apostrophe
wmii+ruby talk for OCLUG
I am giving a quick overview of wmii+ruby later today. In case anyone is interested here are the relevant links: my presentation pdf, magic point my wmiirc config Links from presentation: wmii official site wmii+ruby official site [my blog entries on wmii]{tag/wmii}
dump and restore
I’ve heard many people talk about backups via dump and restore. I’ve never really tried it, although it looks like I should have been using it all along. I am rebuilding my firewall, which is based on a WRAP 1C-2 [sbc]{tag/sbc}. I want to use two such boxes, one to connect to my two ISPs (both cheap) and the other to create a DMZ network. I just finished building one of them (similar as the steps in [this article]{sbc-bootstrap-with-debian}). Now I want to clone the image, because the systems will be almost identical. So I stick in the CF card into my card reader, and run
C style
A new comer to my place of work was asking me how he can improve his code style. Here are some suggestions I had for him.
fetching all git branches from remote
When you clone a new git repository, using a recent git release, by default git will create a .git/remotes/origin with all remote branches. This file lists all remote branches that are to be updated on a fetch. Over time the remote may get more branches, and it may be necessary to update the remote branch list. The way to find out what is available at a remote is to call git-ls-remote origin, then pick out the branches of interest, and add them to the .git/remotes/origin file.
local caching for git repos
I try to minimize the amount of data I pull from git repositories. To do this I have a directory on my file server that has a bunch of clones of git (and hg and previously bk) repositories. All of these are exported and mounted on my other machines in /site/scm/. I will refer to this as cache :) Next, I have a cron job that regularly updates those trees from the their upstream counterparts. All my working copies are cloned from those repositories using the --local --shared mode, or using --reference if I think I will be committing upstream any time soon.
automatic version creation with git
openswan is going through a process of redefining what their versions numbers will mean… what’s stable, what’s testing, what’s devel, etc. I participated in the discovery of how to do this automagically from git release tags. Patrick was so happy with the results that the conversation ended with … 14:49 <patlap> C'mon bart, blog it :-) … and how can I tell the CEO of Xelerance “no” :)
wmii w/ ruby wmiirc
My window managers have changed a few times over the years. I started off with OpenSTEP at Carleton, used that for a year. Then switched to Afterstep, which I used for about 3 years. Next I switched to sawfish/sawmill, and used it for about 4 years. Recently I went through a crisis as sawfish stopped working for me in testing on amd64. I found [ion3]{tag/ion3} to be a nice replacement. I was a happy ion3 user for almost a year and then someone suggested that I try [wmii-3]{tag/wmii}.
small fonts
I don’t use a lot of X applications. The one that I use most often is xterm. I like small fonts, and I find that I have no problem reading a small font on an LCD monitor. Recently someone mentioned the Terminus font. I tried it and it quickly became my favored xterm font… it’s so tiny and clean! Here are the important bits of my .Xdefaults file… XTerm*renderFont: false XTerm*font: -xos4-terminus-medium-r-normal-*-12-*-*-*-*-*-*-* I also grabbed a few tiny fonts from Proggy Fonts and my new wmii font is ProggyTiny. Here is the bit from my .wmii-3/wmiirc-config.rb file… font '-windows-proggytiny-medium-r-normal--10-80-96-96-c-60-iso8859-1' The above font site also taught me how to import fonts into X font server w/o a restart and how to keep fonts in my home directory. Check out this short HOWTO.