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 [...]


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