Import Bigger .SQL file with PHP or Terminal »

Sometimes you can’t get your hands on phpMyAdmin or similar, here’s a simple script to import a .sql file with php where filename.sql is the src to your .sql file. If you’ve got shell access to mysql, you can upload the .sql to your server and simply run: mysql> use db_name; mysql> source /var/dir/file.sql;

Clean wp_head() output »

I’ve never liked the wp_head() output – WordPress’s default output is great for blogs and accessibility but if you’re a developer whose source-code is basically your resume, you don’t want irrelevant and un-indented code leaving skid marks behind the scenes. Throwing this in functions.php will remove most of it.

Increase WordPress Memory Limit »

Nothings worse then getting an email about someone being unable to upload a 6mb .PDF because it “exceeds the upload file size limit” Here’s the fix – but important note: raising postmaxsize increases the possibility of DoS attacks on your server: In functions.php add: If that doesn’t work, it could be a apache restriction, in .htaccess … continue reading »

Coda Haze »

Coda Haze

The lower amount of and less saturated pastel colors in IDE‘s are such a beautiful thing.. for me anyways. Here’s my custom theme for Coda 2: Save as codahaze.sss, open with Coda2.

date_default_timezone_set() Not Working »

This is a silly amateur hour error that I’m positive lots of people miss. datedefaulttimezone_set() needs to be called within functions, it isn’t a global function. The script below will demonstrate the how datedefaulttimezone_set() affects date() (and time()). Will output: // Eastern // Server‘s Time // Central // Eastern