This is an old trick, but I still find it useful and will post it here in case it will help other symfony developers out there. If you are using the prototype.js library for your ajax requests, the Ajax.Request (and similar) utility methods will automatically evaluate the server’s response as javascript if the response has the ‘text/javascript’ content-type header. More…
Status Updates
- First iPhone app nearly complete! I've been waiting for 3 weeks for Apple to finish "conducting company identity verification."
3 days ago - Rainy day! Staying indoors. Creating computerized players in a simulation game that models cooperation in the work place.
75 days ago - Up at 8AM, with a hot cup of coffee brought back from Cafe Lola in Ann Arbor. Will I succeed in putting in 8 billable hours in one day?
100 days ago - full scale irish band outside my window playing the pipes for the past 20 minutes. pretty fun.
109 days ago - listening to Kristin on Maxim Radio!
115 days ago - back from an amazing meal at ouest with even more amazing company.
115 days ago - wondering how so many online tshirt companies stay in business--ones that sell shirts with funny messages, i never see them in real life
122 days ago
RECENT TUNES
- Onra - INTRODUCTION
- of Montreal - Id Engager
- of Montreal - Mingusings
- of Montreal - Beware Our Nubile Miscreants
- of Montreal - Death Is Not A Parallel Move
- of Montreal - Plastis Wafers
- of Montreal - And I've Seen A Bloody Shadow
- of Montreal - Triphallus, to Punctuate!
- of Montreal - St.Exquisite's Confessions
- of Montreal - Women's Studies Victims
Web Development Articles
July 3, 2009 – 1:11pm Symfony: return javascript response
May 5, 2009 – 10:49am Install/Upgrade Subversion on Mac OS X
This is a great tutorial on SVN and it also includes a Intel disk image of SVN 1.6.1 which makes installing a breeze.
April 10, 2009 – 12:56pm symfony cache system: cache growing too large
Symfony has a really powerful cache mechanism, but if you turn it on and don’t configure it, it will cache one file for *every possible url*, and in the case of a dynamic site with thousands of pages, this grows to many gigabytes very fast. This is especially a problem if you have a dynamic search feature, and you have search-friendly URLS where you convert query parameters to /a/friendly/path/like/this. The number of unique paths that generate content on your site is literally infinite, since the URL can include anything the user types in the search box. More…
February 17, 2009 – 4:32pm Recursively delete .svn directories
This came in handy today when I copied a directory from another project and didn’t recognize that it was under version control in that project. Needless to say, my current project got very confused during an svn commit when it encountered this copied directory. To reconcile the situation, I had to recursively delete all of the .svn directories from the copied directory, and then check it in as a fresh copy to the new project. More…
February 17, 2009 – 12:43pm SVN merge trunk changes to your branch
I always have to look up the documentation on how to merge a whole SVN branch to another. Today there were bug fixes to trunk of my project that I wanted to port into my branch. I expected this to be easy since I hadn’t made many changes to my branch, and no changes to the same files that were modified in the trunk. More…
February 17, 2009 – 9:14am Symfony Cross Application Links
This blog post by Fabien Potencier describes how to use symfony 1.2 to create link between your applications within a symfony project. This has been difficult in the past because applications within a symfony project shared only model classes and basic project configuration, but routing was handled by unique application-based configuration. More…
January 23, 2009 – 4:42pm Uploading a file with Symfony 1.2
There is a post hidden within the symfony documentation that discusses how to upload a file using the new forms framework within symfony 1.2. If you are curious about the best way to handle file uploads, it’s worth reading this What’s New in Symfony 1.2 post first, and then come back here for a quick summary of how this works.
Let’s say you would like to allow users to upload PDF files to your site. You store data related to these file uploads in an “article” table in your database. This table has a column named “file” that stores the file name of the uploaded pdf.
The symfony forms framework will generate the basic (and not so basic) code to get you started. If you haven’t yet generated your form classes yet, you can do so with the command:
December 16, 2008 – 1:11pm CocoaMySQL finally replaced with Sequel Pro
As much as I love the command line for mysql, sometimes it’s nice to have a GUI to see your tables and columns visually or to do a data dump into CSV. On OS X I’ve always used CocoaMySQL, although it became apparent a long time ago that it was no longer under development. My brother recently told me about Sequel Pro, a “MySQL database management app for Mac OS X 10.5.” You can download it here. So far it’s been working great. It truly does feel like CocoaMySQL with a Leopard interface.
December 10, 2008 – 8:05pm Starting a new symfony project: Tips for sanity and bliss with SVN
There is something gratifying about starting a new project. You get to start fresh and it may be the only time during the project lifespan where everything is perfect.
Over time I’ve learned a few tricks that personally make my project environment a pleasure to work with. More…
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.



