debugging with -dbg libraries
I am having a problem getting openssl to verify a signature that I generated from a smartcard. I decided to step through the openssl code to see what it’s actually doing when I call RSA_verify()… but I didn’t feel like rebuilding openssl.
svn status like output in git
Today Dave asked me how to get a script-friendly list of untracked files, and modified files… like svn status. First I suggested that he look at --diff-filter and --name-status options for git-diff. git diff --name-status --diff-filter=M While git-diff can actually report a lot of cool stuff (see the git-diff-files man page for more details), it did not solve all the problems. The above worked for getting the list of modified files, but not for untracked files. We scratched our heads and were unable to get anywhere.
Git Cheat Sheet
Zack Rusin “took a break from being insanely handsome” and created a stunning Git Cheat Sheet. There are three formats: medium sized png, large sized png, and original svg. (these are distributed under the Creative Commons License) Now I have to figure out how I can print it in colour.
switching to abiword
Someone on the #oclug channel said today: Mind you, and vim-keybindings add-on for OOo would be nice. So I did the natural thing I googled for it. I am already using vi-bindings in firefox (vimperator) and in zsh. I came accords a link on using vi shortcuts in abiword, which was instantly interesting to me. I tried the procedure and it didn’t work. However, making the following change did work… --- .AbiSuite/AbiWord.Profile-original 2007-08-21 14:18:02.278538328 -0400 +++ .AbiSuite/AbiWord.Profile 2007-08-21 14:20:52.738536739 -0400 @@ -98,10 +98,8 @@ <Scheme name="_custom_" + KeyBindings="viEdit" /> <Recent And now I have modal editing support in an office suite. I still have to play with it to see if I find it useful… but initially it looks great.
forwarding ssh and X through screen
I have an update to my [previous article]{screen-ssh-agent} on forwarding [ssh-agent]{tag/ssh} through [screen]{tag/screen}. I’ve since switched to [zsh]{tag/zsh} and am now forwarding the X DISPLAY environment variable through to the screen shell. You can grab my ~/.zsh.d/S51_screen, ~/.zsh.d/S60_prompt, and ~/.screenrc or read below.
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