Ant Tasks for Git

Posted by Tom on November 13th, 2008 — in Git, Programming

Ant has tasks for CVS and Subversion, but none that I could find for Git. I threw together these simple Ant macros to get started:

<macrodef name = "git">     <attribute name = "command" />     <attribute name = "dir" default = "" />     <element name = "args" optional = "true" />     <sequential>         <echo message = "git @{command}" />         <exec executable = "git" dir [...]

“Mark Old As Read” for NetNewsWire

Posted by Tom on November 13th, 2008 — in AppleScript, Hacks, Mac

I recently heard about an RSS reader (can’t remember which) that had a feature to mark all messages older than a certain threshold as “read”. I thought this was an incredibly useful feature, since I often forget to check my feeds for days at a time, and end up with hundreds of unread items that [...]

A Better BugMeNot Bookmarklet

Posted by Tom on November 9th, 2008 — in Hacks, JavaScript, Programming, Ruby, Ruby on Rails, Web

BugMeNot is a great little service for bypassing the registration process for websites that really shouldn’t require it (ahem, nytimes.com). The bookmarklet brings up BugMeNot for the current website you’re viewing, and gives you login/password pairs which you can then copy and paste.

But wouldn’t it be better if it automagically filled in the username and [...]

Open new Terminal tab in current directory (updated!)

Posted by Tom on October 23rd, 2008 — in Command line, Hacks, Mac

This is an updated shell script / AppleScript for opening a new tab in your current directory (or the specified directory). The last version was for the pre-tabbed version of Terminal.

#!/bin/sh -

if [ $# -ne 1 ]; then     PATHDIR=`pwd` else     PATHDIR=$1 fi

/usr/bin/osascript <<-EOF activate application "Terminal" tell application "System Events"     keystroke "t" using {command down} end tell tell application "Terminal"     repeat with win in windows         try             if [...]

Automagically Wrapping JavaScript Callback Functions

Posted by Tom on October 22nd, 2008 — in Hacks, JavaScript, Programming, Uncategorized, Web

One very nice thing about JavaScript is it’s support for first-class functions and closures. Crockford calls JavaScript “Lisp in C’s Clothing”. I’m no Lisper, but I enjoy I discovering new tricks or applications of functional programming in JavaScript.

I wanted to hook all the browser’s asynchronous JavaScript “entry points” : events, timers, asynchronous XMLHttpRequests, script tags, [...]

Improved Browser Paint Events Bookmarklet

Posted by Tom on October 14th, 2008 — in Bookmarklet, JavaScript, Web

John Resig posted today about a nifty new feature available in Firefox nightlies, browser paint events. He also posted an example script and bookmarklet called TrackPaint. He goes into greater depth in his post, so I won’t bother here.

I wanted something more “real-time” and closer to the Quartz Debug utility included with the Mac OS [...]

Command line interpreter and REPL for JSCocoa

Posted by Tom on October 10th, 2008 — in C, Command line, Hacks, JavaScript, Mac, Objective-C

A few months ago I started working on a JavaScript to Objective-C bridge. We had already implemented Objective-C in JavaScript, so I figured “why not?”

Well, I never got very far, but thankfully Patrick Geiller apparently had the same idea and actually executed it: He announced JSCocoa today. It looks like it’s a solid bridge, about [...]

Recovering Censored Text Using Photoshop and JavaScript

Posted by Tom on October 8th, 2008 — in Hacks, JavaScript, Programming, Security, Uncategorized

My friend Andrew recently posted a teaser for a new project he’s working on, but with part of the headline pixelated to obscure what the project actually is. My curiosity got the best of me and I decided to do what any self-respecting geek would do: write a program to figure out what the censored [...]

git bisect run

Posted by Tom on October 1st, 2008 — in Git, Programming

This feature of git is too cool not to blog about: git bisect, and more specifically, git bisect run.

“git bisect” is a tool that facilitates a binary search of changes to your git repository to help find where a bug was introduced. You can walk through the process manually using “git bisect {good,bad,skip}“, or if [...]

YouTube Fullscreen Bookmarklet

Posted by Tom on September 28th, 2008 — in Bookmarklet, Hacks, JavaScript, Web

I find it incredibly annoying when an embedded YouTube video can’t be made fullscreen, and I have to switch to YouTube.com just to watch it.

So, I wrote this simple little bookmarklet which modifies the embed code for any YouTube videos to allow fullscreen. It could also easily be made into a user script for GreaseMonkey, [...]


Home Blog 280 North SCEC-VDO Wator World X TOOBS Wikipedia Fun Kegbot EasyButton JavaScript x0xb0x XBMC iPhone