Skip to main content


Showing posts from 2014

Running supervisord on Codio

Codio currently does not provide a parts install for supervisord . This can make developing apps that uses Laravel queues an issue since you'd then have to keep a terminal open at all times. So let's keep things simple, and install supervisord manually. Installing the tools The only thing from parts that we will need, is pip. This is a python package management tool, which is what supervisord is written in. Just grab this to your box like so: parts install pip Now that we have pip, we can pull in supervisord through it. pip install supervisord Configuring environment Now that supervisord is installed, we need to setup the boxes configuration to make it easier to use. We need to: Add the python bin to the path. Make the configuration directory for supervisor Make a log directory To add the python bin folder to your path, open up /home/codio/.bash_profile and add the following: $home/.parts/packages/python2/2.7.6-2/bin to the first path entry. Remembe

Laravel, Codio, and Nginx

I have recently come across a *sweet* online IDE, this would be Codio . Codio lets you develop in the cloud and run the code on an actual server. This way you can write your code and run it in the cloud, keeping your development environment universal and in my case safe-guarding against my own nonsense. While Codio does offer their own  documentation  on getting Laravel going, it uses Apache and MySQL. So here is getting going with Nginx, MariaDB, and PHP-FPM on Codio for Laravel development. Create your project Create a project just how you normally would, except select "Git" as the method for getting the base code into the workspace. This will give you an input where you can either put in an HTTP or SSH based git repository URL. If you are using SSH and you haven't setup the SSH key on your repository, it will prompt you to do so automatically with a key Codio generates. For now, I'm going to just use the standard HTTP URL for Laravel which is

You may not need meta charset

It is generally accepted that web pages should have a meta tag to set the charset of the document. However, you may not need it. The HTML5 specification clearly states that when  determining the character encoding  that if it is found in a content-type header attribute, then the engine should no longer look for one in the document or anywhere else. You can set the header either in your application logic or in your server configuration ( Apache  and Nginx examples). So what does this mean for developers?  Well, we all know performance matters. Let's say after gzipping your content this declaration adds just an extra three bytes of data to your page. Across millions of requests around the web per hour which leads to billions per year, that ends up saving a lot of space. Not only that, but think about how the network functions. Packets on the internet have a set amount of space. This is called the  maximum transmission unit  size. It is generally at 1500 bytes per packet for e