Chris Sedlmayr

Symfony Live 2012 18 Feb 2012

It's on and I'll be there... will you? An idea for a pre-conference attendee meetup.

Curl and xmllint play nicely together 05 May 2011

Fetching XML via curl is useful for debugging API responses, especially if they are locked down to certain IP addresses, take a look to see how to have the ouput nicely formatted rather than a single long string.

Automatically renaming multiple files by rule 16 May 2010

I recently had the need to rename a bunch of files according to a simple rule.
In the directory, any files that had a prefix of “Gee_” should have the prefix changed to “Kif_”
After a little digging I found a simple but quite tasty solution.
Simply run this at your command line.

for f in Gee_*; do mv "$f" "Kif_${f#Gee_}"; done

Job done. It finds files matching the pattern supplied, then loops through renaming them appropriately.

Git pull and git merge between developers 15 Apr 2010

A short article outlining how you and your fellow developers can use git between you, without ditching svn as your upstream master repository (as may be required in your place of work)

Git Manuals, Docs and Handy Links 06 Apr 2010

As i am a recent git convert I find myself reading a lot of guides etc on the best way to use git and how my workflow can change now i’m using a DVCS.

Zebra Striping with PHP the Easy Way 16 Mar 2010

Using one of the built in Maths functions of PHP we can easily create zebra striped lists.
Let’s say we have an array of entries stored within the $comments variable.
All we have to do with this is to use the fmod function and assign a css class that alternates per entry.

The use of 301 rewrite 16 Mar 2010

If you are hosting a domain (or multiple domains) using VirtualHost entries, it is bad practice to use individual entries for the same domain just to cover the inclusion or exclusion of the www in the address, amongst other things it is bad for SEO, but of course you still want visitors to be able to go to your site via the 2 starting addresses and

Imagemagick sfThumbnailPlugin fix for scaling under symfony 1.0 16 Mar 2010

I’ve been using the sfThumbnail Plugin in symfony 1.0 for image resizing when users upload.
When I asked the plugin to resize an image with scaling there was a problem and the image came out skewed and distorted.
After a little research I found the following fix.