Rewrite Trac links to Redmine with nginx

I recently migrated from Trac (at http://recurser.com/trac/ ) to Redmine (at http://recurser.com/code/ ), and wanted the Trac links to redirect to the right place if possible. The nginx rules that follow achieve most of that. As always, there are a few catches: ...

September 11, 2008 · 2 min · Dave Perrett

Disable store links in iTunes 8

The preference to remove these links in iTunes 7 seems to have disappeared in version 8. You can turn them off, however, in the terminal : $ defaults write com.apple.iTunes show-store-arrow-links -bool FALSE Restart iTunes, and the links should be gone.

August 17, 2008 · 1 min · Dave Perrett

Filesystem path is neither a file nor a directory 160013 - SVN / Trac Error

Recently I had an SVN repository with a couple of corrupt revisions that I couldn’t figure out how to fix, which caused Trac to stop displaying revisions after the corruption. Trying trac-admin resync was no help, throwing this exception : ...

July 27, 2008 · 2 min · Dave Perrett

Installing Trac on CentOS

Before you do anything, go ahead and install subversion . Install the python easy install tool: ...

July 27, 2008 · 3 min · Dave Perrett

Simulate delayed-fade in jQuery

Unfortunately there is no .delay() function in jQuery. You can fake this, however, by using the .fadeTo() function: $("#my_element").fadeIn(1000).fadeTo(5000, 1).fadeOut(1000); ...

July 15, 2008 · 1 min · Dave Perrett

svn: Can't find a temporary directory: Internal error

If you’re getting a ‘svn: Can’t find a temporary directory: Internal error’ error while using subversion, check the disk space on the server : $ df You’re more than likely out of space. [dave@dev2:~/]$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/vg0-rootvol 73608360 73605908 0 100% /

July 14, 2008 · 1 min · Dave Perrett

Browser detection with PHP

You can use PHP’s get_browser() function to find out information about user’s browsers, but it takes a little setting up. ...

June 23, 2008 · 2 min · Dave Perrett

Force MySQL Encoding to UTF8

Often MySQL will need to be forced to return results in UTF8 encoding. There are two ways to do this: ...

June 23, 2008 · 1 min · Dave Perrett

PHP5 on OS X Leopard

PHP5 is already installed on Leopard by default - all you have to do is turn it on. First, turn on web sharing - go to System Preferences->Sharing and make sure the ‘Web Sharing’ option is turned on. ...

June 23, 2008 · 1 min · Dave Perrett

Setup 64bit CentOS (PHP5, MySQL, memcached, ketama)

I recently had to set up a few CentOS servers with PHP , MySQL , memcached and ketama, and ended up writing this script to do it. You can grab the whole thing from subversion (you’ll need the php folder as well). ...

June 23, 2008 · 3 min · Dave Perrett