3 posts tagged “development”
Those of you who are into that sort of thing probably already knew about (and love) the Subversion bundle for TextMate[1]. I've been using it for ages and its truly wonderful in terms of productivity and seamless integration. However, the one thing that always bothered me is that there are some times when I just want to check the Subversion status of a particular directory or perhaps check in a single file without opening up the whole thing in TextMate. Usually, I switch to iTerm, and "svn stat PATH" (or whatever) right from there.
But no more...
I just now found out that PathFinder (which is also one of those "change the way you work" apps that I use and love) has SVN integration built right in! All you have to do is navigate to a directory that is under svn control, hit Control-Command-S and voilá!
Holy CRAP that's awesome... One less reason to go to Terminal and, it seems, to develop a Subversion GUI client for the Mac...
[1] - If you do development on Mac OS X and aren't already using either TextMate or Subversion or both, get thee to Google now. It will change the way you work permanently and for the better.
If you're a Perl hacker on Max OS X, you probably find yourself referring to POD docs quite a bit. I usually use TextMate for viewing POD of the current module I'm looking at, (Command-control-p) but TextMate's pod2html viewer only allows one document at a time, This is often about 5 or 6 too few. The "perldoc" command has sort of a similar issue unless you want to have a large number of terminal windows open.
So if you fall into that category, you'll want to get pod2pdf and its associated libraries. Unpack and install it[1]. Then, add the following little useful function to your .bash_profile or some script that is executed upon login.
# Convert, cache and open POD docs in Preview.app
podview() {
# Customize the path to your POD PDF directory
POD=~/Documents/PODmodule="$@"
moduledir=`echo $module | sed -E 's/[:\/]+/_/g' \
| sed -E 's/^[\._]+//g' \
| sed -E 's/\.p[lm]$//g'`
if [ ! -e "$POD" ]; then
mkdir $POD
fi
if [ ! -e "$POD/$moduledir.pdf" ]; thenperldoc -T -u $module > $POD/$moduledir
pod2pdf $POD/$moduledir; rm $POD/$moduledir
fi
open -a Preview "$POD/$moduledir.pdf"
}
After that, all you have to do is type "podview Some::Perl::Module" and it will be automatically opened in Preview as a PDF. In addition, the PDF is cached in ~/Documents/POD (by default) to speed up the process or loading it or even finding it with, say, QuickSilver?
[1] - Don't forget the actual pod2pdf wrapper script which is also included in the distribution but not installed via make install. Put it somewhere in your path.
This is old hat, but I stay away from Javascript when I can, so it's new to me. Maybe it's new to you too.
Safari has apparently, for a while, allowed you to throw errors to its Javascript console for the purposes of debugging. This eliminates the bothersome alert() madness...
if (window.console) {
window.console.log("I think therefore I code!");
}
else {
alert("I think therefore I code!");
}
Nice...