A friend’s gmail password was either cracked or stolen somehow and his account started sending out mass messages to his contacts. The message contains the following: More…
November 13, 2008 – 3:58pm Gmail Spam from ui-mall.com — Don’t fall for it!
October 24, 2008 – 5:01pm IE6 mouseover event not firing, png filter
This took me way too long to figure out. I had a series of div tags that had mousover and mouseout events attached to them using prototype. I couldn’t get these events to fire in IE6 no matter what I tried! Events worked on links, but not any other element.
First thing to check: Are you using the png filter trick?
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop src='/images/white_bg.png');
If so, make sure your mouseover elements have “position:relative” or else the event won’t fire on any element inside another element with the png filter.
This post along got me on the right track.
August 28, 2008 – 11:40am Using rsync to synchronize local and remote directories
When our design team is done with an html / css design, they upload it to a webserver for the client to review. Once it’s been approved, it’s time for the developers to download the static site and start integrating it into the php application. To pull down the site files, FTP does the job just fine, but invariably there will be changes made to the template even after it’s been approved. Or, perhaps the developers want to start on a few pages that have been finished before every page has been coded into html. A nice way to pull down only the latest files changed by your designers, making sure to get any related images or css files, is by using rsync.
Here is what works for us:
rsync -avcn -e 'ssh -p [ssh port number]' [user]@[your remote domain]:/home/[user]/[your remote template path]/ [your local template path]
This will do a dry-run, meaning it won’t actually copy any files, but it will show you what it would have done. When you are ready to go for it, remove the “n” from “-avcn”, and you’ll automatically pull down any files that have been modified on the remote server.
June 5, 2008 – 12:50pm Get value of radio button group using prototype
If you want to get the value of the selected element of a radio group, prototype makes this easy. There is more than one way to do it. I’ll update this post as better methods surface. Check out code after the jump.
February 29, 2008 – 1:45pm Propel Transactions with Symfony
It’s easy to create transactions with Propel. This can be very useful when you are deleting rows from your database from multiple tables, and want to do an “all or nothing” approach so that things don’t get messy. More…
February 9, 2008 – 5:02pm Using svnX with svn+ssh on a non-standard port
svnX is a great mac GUI for svn repositories. A lot of our svn servers are accessed via non-standard ports for security, and a limitation of the svn+ssh syntax is that you can’t specify a non-standard port in the address name. To get around this in the command line, you can set a local environment variable “SVN_SSH” like so: More…
January 24, 2008 – 4:48pm Propel Criteria Left Join: using addJoin() and addAlias() to join a table twice
Here is a way to do left join on two columns in a table that both were foreign keys in the same table using Propel. This might happen if for example you have a table with a parent_id and a child_id in a nested set that both refer to the same table, or as an example you have a table “documentation” and each documentation can be categorized into a main category and a sub category.
What happens when you want to do a left join in your documentation query, so that if present both the related category and sub_category objects get included in the results?
$c->addJoin(DocumentationPeer::CATEGORY, CategoryPeer::ID, Criteria::LEFT_JOIN);
$c->addJoin(DocumentationPeer::SUB_CATEGORY, CategoryPeer::alias('c2', CategoryPeer::ID), Criteria::LEFT_JOIN);
$c->addAlias('c2', CategoryPeer::TABLE_NAME);
Done and done!
January 24, 2008 – 4:37pm Installing Symfony on Leopard
I’ve found the best way to install symfony on Leopard is to use the version from SVN. I find this is easy to do, and easy to update in the future. Here is a cheat sheet for those looking to get up and running with symfony on their Mac running 10.5 Leopard. More…
January 21, 2008 – 9:50am svn, apache2, os x leopard 10.5
Mac OS 10.5 Leopard ships with Apache2 and SVN. However, if you want to keep a local svn repository and not use an external svn server (only really useful if you have projects which you will be the only developer), you have to set up the repository yourself. Here is a quick cheat-sheet to help you do just that. More…
January 14, 2008 – 2:55pm symfony propel-load-data
Loading data from fixtures can be extremely useful to pre-populate your database so you have something to test and code with. I frequently use the propel-load-data task in two ways, the first when altering the schema, and the second to add some new data on top of whats in the database.
This will rebuild your db and model from schema.yml, insert the new structure into your db, and load data from the fixtures in /data/fixtures:
./symfony propel-build-all-load frontend
To load in additional data from a specific fixture file, you can use this command:
./symfony propel-load-data frontend dev data/fixtures/[filename].yml append



