bartman's blog

git-svn with multiple branches

Dave recently wrote about git-svn with multiple branches. Worth a read if you want to use git in a hostile svn environment.

Linus on Git at Google

YouTube has a good talk by Linus Torvalds on why you would want to use git. I think a few points he sold very well, and a few were very Linus-centric. It’s worth a watch.

vim modelines insecure

I have previously disabled modelines in my vimrc, but had turned them on recently only to learn today that they are subject to another vulnerability. I’ve seen this before. Enough is enough. :) Fortunately, this sparked a debate on vim-dev mailing list. One of the outcomes is a vim script that replaces the modeline parser in vim. It is said to be a lot more strict about what it permits as valid modeline components and allows the user to control that in the vimrc.

bios disassembler

I’ve been having some issues setting up a x86 environment from scratch in order to get the BIOS to work once returning to real mode. I decided to figure out why. I know that the BIOS has the code to setup the processor and the peripherals to make things work… how does it do this?

dd hex arguments

It sure would be nice to to not have to convert hex numbers manually when using dd… # dd bs=0x200 dd: invalid number `0x200' This was a really easy fix. Here is the patch.

urxvt mouseless url yanking

In the quest for a completely mouse free desktop, I wanted to be able to yank URLs from the termial without using the mouse. This happens often enough in IRC when I would want to grab the most recent URL and run it in firefox. I talked to the author of vimperator and he suggested that I look at urxvt (packaged as rxvt-unicode). So I did. A few hours later and I have a perl plug-in for urxvt that does just want I wanted.

gitdiff.vba v2

I released version 2 of my gitdiff.vba vim script. It now supports two features: :GITDiff [commitish] Split the vim window vertically, display the HEAD, or some other changeset, version of the file in the split, then diff them. :GITChanges [commitish] Highlight lines that were changed since the HEAD or some other changeset. I also started using the VimBall script, which is a package format for vim scripts. So to install it, you need to first have the vimball extension. Further, if you have the GetLatestVimScripts you can use the :GLVS commands to automatically upgrade your packages.

india

I got some obfuscated code from a buddy (of Indian origin coincidentally) that draws the map of India. It’s obfuscated code, but it’s not perl.

zsh fun

I have been playing with zsh a bit today. Here is the outcome: use vim to view man pages; this requires manpageview.vim vim plugin. function vman() { vim -c ":RMan ${*}" ; } these function store the current directory in X clipboard and then restore the path from the clipboard, which is handy when you want to restore the path in another xterm… function xpwd () { pwd | xclip -i ; xclip -o ; } function xcd () { cd `xclip -o` ; }

pipe to pastey.net

Here is a little script that lets me post to pastey.net from a shell prompt #!/bin/bash set -e AUTHOR=bartman SUBJECT=pipe LANGUAGE=c w3m -post <( echo -n -e "language=$LANGUAGE&author=$AUTHOR&subject=$SUBJECT&tabstop=4&text=" ; sed 's/%/%25/g' | sed 's/&/%26/g' ) \ -dump http://pastey.net/submit.php