June 2010
5 posts
2 tags
Modifying Subversion commit messages
Sometimes when I try to quickly repeat my last command in the terminal, I end up firing off a svn commit. Unlike with Git, you cannot modify commits in Subversion, but you can modify a revision’s properties — like the log message. Here’s how: svn propedit --revprop -r 1234 svn:log This will open your $EDITOR and it lets you edit the log message for the specified commit (1234). Note: in...
Jun 30th
2 tags
Using relatedTarget in event handlers
Here’s a nice trick for working with mouse events in a web page. Given a simple drop down menu, I used to use a timer to delay the closing of a submenu while the mouse travels from the menu title to the sub menu (where it nog longer hovers over the menu title, that had the original event handler). The timer going off would hide the submenu, unless the mouse entering the submenu fired a new...
Jun 24th
1 tag
Quick text manipulation with Ruby
Here’s a nice trick I like to use to quickly transform some random piece of text using Ruby and Textmate: string = DATA.read # do stuff here... __END__ Text to transform goes here By using the __END__ line you tell Ruby to not executre all that follows, but capture it in an IO which you can read. You can then quickly whip up a script and have Textmate run it using ⌘R. The script’s...
Jun 21st
Jun 3rd
9 notes
3 tags
Open Mail window
Here’s something that has annoyed me ever since I got a Mac: when switching applications using the keyboard (e.g. ⌥-Tab), choosing Mail would not actually open a window if there wasn’t one open already. It seemed this was only good for switching to windows, not applications. Although this bugged me, I never got round to finding a solution, until now. It struck me that you can switch...
Jun 2nd