April 30, 2009

In Pursuit of the Perfect Dev Environment: Textmate PHP Syntax Validation

Kevin Hallmark @ 10:07 am —

cssgallery.info has an article about validating your PHP syntax automatically on save using Textmate. This is incredibly valuable. No more uploading files with bad syntax!


April 16, 2009

Essential Safari Web Developer Plug-ins

Kevin Hallmark @ 12:56 pm —

So I’ve been gathering a lot of different Safari plug-ins and I thought it was time to document me development setup. This is a list of plug-ins that I use with Safari to really help me get things done.

Essential Developer Plug-ins

These are plug-ins I can’t live without. I usually put these on any machine I have to do development work with. I can’t work without these plug-ins.

  • SafariTidy – This plug-in gives you a bar at the bottom of Safari much like the HTML Validator for Firefox
  • Forget Me Not – Saves your tabs and lets you reopen them with Cmd+Z (in case you accidentally close one you don’t want to)
  • XML Viewer for Safari – This plug-in let’s you view XML in a nicely formatted way, instead of just the text inside the XML.

Nice to have plug-ins

These are plug-ins I don’t put on every machine, but I’ll usually put them on any machine I use on a regular basis.

  • DeliciousSafari – Integration with Delicious into Safari, including a links menu in the menu-bar and an add to Delicious button. I know there are links you can put on the Bookmarks Bar, but I like this solution so much more.
  • SafariStand – Allows you do inline HTML modification, gives you a visual Tab Shelf and some other nice goodies. Might be obsolete with Safari4, but I haven’t upgraded yet.
  • Safari AdBlock – Finally a free AdBlock plug-in for Safari that actually works. It uses the Firefox plug-ins file format for fast updates

These are only a few of the plug-ins that are available for Safari. I’ll keep this list up-to-date as I discover new ones.

April 3, 2009

Reverse Engineering MySQL Queries in web apps

Kevin Hallmark @ 10:26 am —

So here I am, sitting at work. I’ve been tasked with reverse-engineering the login system for this website. Ugh. The code is spaghetti. Queries are a mish-mash. How do I figure this out?

What I discovered is that you can log literally every single mySQL query made to the server. This is really useful if you need to figure out crazy things like what queries run when new user is inserted.

Add the following line to your my.cnf file:

log = /var/log/mysql/mysql.log

This gets rid of the hassle involved with finding and tracing mysql queries directly.