Stargazing jGrowl


I get a fair number of emails about jGrowl each week. Two common requests are 1.) Can you include a compressed version? 2.) Do you have a CDN?

I used to ship a compressed version, but quite honestly I always forgot to update it so I wound up removing it. Plus, it never seemed like I was using the right one, as I was always getting suggestions to try a different compression process. Nonetheless I am willing to give this another shot, but with a specific purpose...

CloudFare has their cdnjs.com site which is an awesome contribution to the community for providing a CDN for all of the other JavaScript libraries you want to use. CloudFare's cited criteria for putting a library up is 100 stargazers on github. So if you are reading this and either like, use or just admire jGrowl do me a favor and go star it over on github. If we reach 100 stargazers I'll submit a request to cdnjs.com and see if we can't get a compressed version of the library up on a CDN.


Premature Jesus


Normally on March 25th the church celebrates the Annunciation, when Mary is told that she will conceive and carry the Son of God in her womb. Typically this falls during Lent, which at first glance can seem odd, but then we remember a baby normally bakes for nine months, and nine months from now is Christmas... Well then it all adds up. Here's the thing though... This year Jesus is going to be premature when Christmas comes around. He's gonna bake about two weeks less this year because March 25th falls in the Monday of Holy Week. I'm told this would normally transfer the festival to after Holy Week, because nothing trumps Holy Week. But then there is the Octave of Easter and you can't do the Sunday after Easter because Sundays during the seasons of Easter are privileged. So the Monday one week after Easter becomes the day we celebrate the Annunciation. That's April 8th, the Monday of Quasimodo Geniti if you weren't tracking yet.

I've been trying to think of how to adjust the algorithm on Sanctus.org to make this happen and quite frankly I think I'm going to take a Mulligan. Transferring a festival one day, I can handle, but transferring it two weeks and across a month presents some challenges. Nonetheless, in full disclosure I wanted to make it known that if you're looking around for the Annunciation you won't find it on Sanctus.org this year. Never fear though, Higher Things has you covered with an awesome Reflection for the Annunciation.



MySQL is one of the most widely used database servers for web development.  It's free, has a wide range of support and is easy to get up and going.  Add to this native bindings in just about every language and you've got a pretty powerful databasing tool at your hands.  Percona is a MySQL consulting company with a super-awesome distribution of MySQL tuned for performance. For the most part Percona packages should be a drop-in replacement with MySQL. When it comes to system administration tasks I like to throw Puppet at the problem, it makes it easier to replay the configuration down the road and I can track the configuration changes in git. But there's a problem when you change the package name for the defacto-standard Puppet MySQL module.  The referencing of the service and the default pid file in the Percona distribution and subsequently the reload following install fails, as well as anything downstream of those items. This was unsatisfactory to me so I poked around to figure out a way to make this work, despite the bug in module. Below is a Puppet manifest with some hackey'ness if you're using Percona that will get it working and allow you to use the rest of the Puppet MySQL module without problems.

https://gist.github.com/stanlemon/5178407



If you are a web developer on OS X you probably are sporting your own installation of your database server.  If you are running MySQL you might be haunted by strict mode.  MySQL has modes as documented here that effect the behavior of various parts of the system.  In strict mode values do not get casted between types, which is where I ran into issues.  My favorite ORM was passing a boolean true into a tinyint(1) and causing the transaction to abort.  This is thanks to STRICT_TRANS_TABLES in my case.  The first thing I checked was my /etc/my.cnf to see if "sql_mode" was set in the [mysqld] section.  It was not.  So I tried setting it to something other than STRICT_TRANS_TABLES and restarted MySQL.  No luck, the setting was still on.  After a lot of poking around I found out that MySQL for OS X from Oracle ships with a /usr/local/mysql/my.cnf which is loaded on startup. In this file is a sole configuration directive for sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES.  Once I commented this out and restarted the server strict mode was off, my ORM worked and I was happy.


Composer on OpenShift


Yesterday I talked about running composer on Amazon's Elastic Beanstalk.  There it is builtin and works out of the box for you.  If you are on OpenShift (my preferred PaaS) composer does not come out of the box.  Matthew Weier O'Phinney has posted an article on the steps he took to get composer installing his project's dependencies, and that's definitely a worthy read.  However, my deployment hook for OpenShift is a little bit different and I wanted to share that.

There were two things I wanted to accomplish.  First, I did not want composer.phar in source control.  Second, I wanted to take advantage of composer's ability to cache dependencies to speedup my deployment process up.  So here is what I use in my ./.openshift/action_hooks/deploy script:

https://gist.github.com/stanlemon/5177925

As a bonus here's a tip about markers... OpenShift will restart Apache and Zend Server with every deployment. You may not want or need to do this. If you don't, simply touch a file to ./.openshift/markers/hot_deply and then next time you push your changes up OpenShift will leave all those services running when it deploys.