PHP 5.4 Stable

Good news: PHP 5.4 is stable!

Some of the key new features include: traits, a shortened array syntax, a built-in webserver for testing purposes and more. PHP 5.4.0 significantly improves performance, memory footprint and fixes over 100 bugs.

Traits look very cool and the shortened array syntax is a very welcomed language feature. The built in web server is going to be quite handy too, especially for small hacks or perhaps even a small daemon that speaks HTTP.

I will be writing more about these features in the future as well as my experiences upgrading. For now, get yourself the source and happy hacking!

Posted in Misc | Leave a comment

Getting Around Entering a SSL Passphrase when Restarting Apache

Shame on me for not knowing this earlier.

sudo apachectl -k graceful

Reloads the Apache httpd gracefully by reloading configs only. This is hella useful if your server has SSL VHosts with passwords that you don’t know.

RedHat folks can do use service too:

sudo -i service httpd graceful
Posted in Misc | Leave a comment

Batch Update All Your Vendor Repositories

I’ve got just shy of 100 vendor repositories that I pull from for my side projects and client work. Updating them all has become quite a bother so I wrote this little guy to save me some time.

It’s certainly not perfect, and sometimes falls over, but this does the trick. This handles both Git and SVN repositories, but I’m sure with a few extra lines you can make it work for whatever SCM you prefer to use.

Posted in Bash | Leave a comment

DOM Monster

Amy Hoy and Thomas Fuchs have teamed up together again to bring another excellent tool for JavaScript developers: The DOM Monster Bookmarklet.

This is an interesting approach to JavaScript performance that analyzes the DOM to report potential optimization points.

It’s fully open-source, hosted on Github, and available as a bookmarklet so it’s always updated. Be sure to drop them a line and thank them for building such an excellent tool.

Posted in JavaScript | Leave a comment

Amen.

I couldn’t agree more.

 

Posted in Misc | Leave a comment

Beanstalk Does Version Control for Designers

The Beanstalk guys are starting to expand into the design arena with their latest feature announcement for Design Preview.

The idea reminds me a lot of the 2-up or 4-up view in the Save for Web dialog in Photoshop, except instead of comparing compression levels, you are comparing previous versions of the document. What makes this ridiculously useful is that it works on both images and HTML documents — yes, CSS and images are pulled into a real HTML preview.

As expected, you can view the documents side-by-side as well as overlaid on top of one another. You can even make the document public to share with clients.

Personally, I’d love to see this idea expand into a larger preview browsing tool, ready for client consumption. Seriously, how many times have you wished for a more automated solution to sharing various design options to clients (options, not versions)? You could technically hack it by overwriting the preview file a few times, but who wants to do that?

 

Check it: Beanstalk: Version Control for Designers.

Posted in Bookmarks | Leave a comment

Commerce Bug has changed my life.

I’m not one to endorse products here, but I do think this is a pretty good link to share for my fellow Magento developers.

Commerce Bug is the must have Magento debugging extensions for developers, designers, and store managers. It’s like having a Magento Expert on call 24/7, and will save you and your teams hours of work every day. Order your copy now and start working with Magento instead of against it.

I purchased Commerce Bug a few weeks ago and have found it to be the single most important tool to my Magento-related development (excluding a text editor, of course). The Blocks and Layout information alone make this product worth the $35 buy.

I’d normally do a brief write-up on why it’s so awesome, but I’m pretty sure the screencast they’ve created will do a much better job explaining it than I ever could. There’s also a live demo site too where you can get a feel for it.

This is a genuine recommendation. No affiliate sales here.

Posted in Magento | Leave a comment

Mozilla’s School of Webcraft

There are so many awesome things about Mozilla’s School of Webcraft – being 100% free certainly puts it in a top ten list.

Classes will be between six and 10 weeks long; they’ll revolve around topics relevant to web designers and developers, including HTML5, JavaScript and CSS. Previous classes have also included non-developer topics such as organic SEO. Requisite skill levels will run the gamut from novice to expert. The volunteer-run courses will begin on January 26, and proposals for new course ideas are still being accepted.

via Learn HTML5, JavaScript and CSS With Mozilla’s “School of Webcraft.

Posted in Bookmarks | Leave a comment

Gawker: How not to handle a security breach

Gawker. Poor bastards. Hopefully this is a good lesson to all the other arrogant pricks on the web.

Opinions aside, I think this is a textbook example of how not to handle a serious breach.

The Real Lessons Of Gawker’s Security Mess – The Firewall – the world of security – Forbes.

Afterthought: I find it rather interesting that so much emphasis was put on DES. While it was a pretty interesting lesson (I have zero background in crypto algorithms), I’ve come to the conclusion that passwords – no matter how “strong” – are just an awful security mechanism.

Posted in Misc | Leave a comment

How to enable admin_ prefixed actions in Lithium

For all the former Cake folks in the audience considering a Lithium migration, you’ll appreciate this gist to enable “admin_” prefixed controller actions.

The first step is to create a rule in your action bootstrap. Don’t worry, it sounds more complicated than it really is. Just open /config/bootstrap/action.php and add the following code to the bottom.

Dispatcher::config(array(
    'rules' => array('admin' => array('action' => 'admin_{:action}'))
));

After that, enable a persistent route parameter (another incredibly useful feature) for all admin routes. Open /config/routes.php and add the following route definition:

Router::connect(
    '/admin/{:controller}/{:action}/{:args}',
    array('admin' => true),
    array('persist' => array('admin', 'controller'))
);

I highly recommend reading the docs for the Dispatcher class — there’s a lot you can do with this setup. Likewise, there’s a good introduction to persistent parameters on the Union of Rad blog.

Posted in Lithium | Leave a comment