Pragmatism in the real world

Sublime Text 2 Plugin: Function Name Display

As I'm using Sublime Text 2 more and more, I thought it would be useful to display the current method name in the status bar. I poked around on the forums and created a plugin from ideas I found in a couple of different threads. This plugin is imaginatively titled Sublime Function Name Display! As I've hooked into the on_selection_modified event handler, I was keen to avoid slowing down the editor too much when you… continue reading.

Two new Sublime Text 2 packages for PHP

Stuart Herbert has written two new Sublime Text packages for PHP: Additional PHP Snippets PHPUnit The best way to install these is to install Package Control first and then use shift+cmd+P -> install package. Even better, Stuart has rolled my getter/setter creation snippet into Additional PHP Snippets, so you can now have it without any hassle! Update: Also, Ben Selby has created a package for DocBlox!

Sublime Text 2 Snippet for PHP getter and setter generation

Update: This article has been superseded by Improved Sublime Text 2 PHP getter and setter generation I've been playing with Sublime Text 2 recently and have quite enjoyed how quiet my ageing laptop is when the fans aren't running due to a Java-based IDE. As with a lot of editors, Sublime Text supports snippets which are essentially text expansions of a short phrase into more text. I needed to create a few getXxx() and setXxx()… continue reading.

Using PDT with Zend Framework Projects

I original wrote this as a comment on Victor Nicollet's blog, but I thought I should document it here too so that I can refer other people to the information. These are some tips and tricks when using PDT with Zend Framework that make my life easier: Autocompletion for dynamic properties Zend_Db_Table_Row_Abstract uses __get() and __set() magic in order to map to the underlying database table row in question. This means that you can use… continue reading.

The watch Linux command line tool

I'm sure everyone else already knows about watch, but it's new to me. This little utility executes a program repeatedly at a set interval and displays its output. I've been using it with mysqladmin's processlist command like this: watch -n 1 /usr/bin/mysqladmin -uroot -pMYPASSWORD processlist Note that this does put your password on display at the top of the command window whilst watch is running. If you don't want that, you could write a little… continue reading.

Flickr Uploadr

The new Flickr Uploadr was written using Xul. Richard Crowley has put up a post at the Flickr blog with links to various articles that he's written about devloping with XUlrunner. Fascinating stuff and a must read for anyone who writes Xulrunner apps. Even better, the full source to Uploadr is available!

On Mail.app

As I mentioned a while ago, I'm now using a MacBook Pro. All is going well, and I like Mail.app's search and data detectors very much. There are some niggles though that I miss from Thunderbird. My top 3 are: * GPG integration (Thunderbird's Enigmail) * Mail.app's insistence on attached PDFs and images inline * Filing mails to arbitrary folders using the keyboard (Thunderbird's nostalgy) It turns out that there are solutions to all three… continue reading.

Site Stats

One thing I get asked a lot about at work is site stats. Usually, the client wants to know how many visitors they get on any other day along with other data such as where the visitors came from and which search terms they may have used. So far, I've used Google Analytics and PHPMyVisites JS based logging along with Analog on the logs themselves. I've also experimented with Mint on one site. Generally, I've… continue reading.

Notes to self, re: IE6

I've just spent way too long today debugging stuff in IE6 that I already knew once I found the problems! So, next time I have vertical spacing issue in IE6, I can come here and remind myself that in IE, <form> has margin on it by default… Also, the YUI panel doesn't seem to work properly in IE6 if it's contained within an element that is positioned "relative" with CSS. Now that Christmas is over,… continue reading.

TaskPaper

One of the apps that I've found that I'm using daily is TaskPaper from Hog Bay Software. It's a brilliantly simple idea where all it does is format up a standard text file to make it easier to use as a todo list. You just start each item with a dash and it will automatically provide a checkbox next to the item. When you tick the checkbox, then a tag, @done, is added to the… continue reading.