category - devops

Boxen Tips and Tricks

Running multiple computers can be frustrating. How do you make sure you have the same software on your work computer as your personal computer. Or how do you make sure you have the same settings on your desktop as you do on your laptop? We'll look at Boxen and how to set it up to get the most out of it.

Continue reading

Quick Tip: Protect Important EC2 Instances

I did something really stupid today. I was doing a load test with Bees With Machine Guns! that I thought was only going to hit Apache, and not the database. Turns out there is a small database call on the page I was hitting, and caused the database to spike. I tried exiting out of Bees, but it wouldn’t. The site started to crash, so I went to terminate the bee instances in the AWS console, but didn’t realize I had the production database selected. After hitting terminate, all hell broke loose.

Continue reading

Installing pcntl On Lion

I needed the pcntl module for a project I’m working on in PHP. By default this module is not installed when you install PHP, so you’ll need to compile it. There is a brew package for it, but I couldn’t get it to work, and I think it’s just as simple to compile it.

Continue reading

Why You Should Write Tests

Last week I started writing tests for my framework. I’ve got to be honest, I rarely write tests for my code. This was the first time I really wrote tests, but I recommend it.

Continue reading

Getting Around CORS in CloudFront

We ran into an issue at work the other day with CloudFront and S3. We were trying to load assets via Ajax from our CloudFront distribution, but kept getting an “Origin http://example.com is not allowed by Access-Control-Allow-Origin” error. There is a W3 spec called CORS (Cross-Origin Resource Sharing) that prevents retrieving data from another site. To get around this, you would normally set an “Access-Control-Allow-Origin” header, but S3 limits the headers you can set, and that’s not one of them. I’m not the only one who finds this problem annoying. Amazon has said there are plans to implement this feature, but they also said that two years ago..

Continue reading

The Perfect Dev Setup on OS X Lion 10.7

A while back, I upgraded my work computer to Lion. Instead of doing a normal install, I installed Lion onto a flash drive and did a clean install. This gave me a chance to make my system exactly how I wanted it. I managed to get an almost perfect development setup. When my laptop’s Ruby install got a little funny, I decided to do a clean install of Lion and follow the same setup, and document it set by set this time.

Continue reading

Using Git Commit Messages As Your Changelog

I love git. It’s a powerful tool that I keep discovering new commands for. Pair git with GitHub and you’ve got a near perfect way to manage code.

Continue reading

Installing Memcache On Arch

This is a simple guide to get Memcached and the Memcache/Memcached module(s) for PHP installed on Arch Linux.

Continue reading

Arch Linux

The past couple of weeks I’ve been working with Arch Linux, and all I really have to say is wow! If you’ve worked with Linux at all, I bet it’s been Ubuntu, and don’t get me wrong, Ubuntu is great, but Arch is awesome. Arch focuses on simplicity and it does a good job of it. As a beginner, you could set up a server with Arch and not run into any issues. It’s also has a unique release system that’s always up-to-date. Everyday I’ve logged in any there’s always a new update, with this update system, you can make sure you are always running the latest and greatest, with other systems you’d have to wait 6 or more months for a update.

Continue reading