Link Post and Podcast Roundup: August and September Edition

I didn’t feel like I had enough for a August version. Enjoy:

Amazon Web Services in Plain English

I don’t know why Amazon has to make this so complicated but this is a good guide. I actually didn’t even know they had some of these services.

JS-YAML demo. YAML JavaScript parser.

I found this to be super helpful when finding a problem with a YAML document.

DevOps team topologies

This is the best image I’ve seen to explain what DevOps is:


I’m going to adding this to some of my higher level input validation UnitTests ASAP.

AT&T Hotspots: Now with Advertising Injection

This is the problem with free services. It’s never free.

I Had a Baby and Cancer When I Worked at Amazon. This Is My Story

I find it interesting how some employees aren’t happy with the working conditions at Amazon and some are. I don’t have any solutions I just find it interesting.

Learning to code is overrated: An accomplished programmer would rather his kids learn to read and reason

There’s nothing wrong with basic exposure to computer science. But it should not come at the expense of fundamental skills such as reading, writing and mathematics — and unfortunately today our schools, with limited time, have tons of pressure on them to convey those basics better.

As someone who hires programmers I understand the need for them right now but I don’t think everyone needs to know how to program. Spelling and grammar are WAY more important in my opinion.

Incase of Fire


Podcast: FLOSS Weekly 351: Kubernetes

Another cool project I wish I had time to look into.

Podcast: FLOSS Weekly 350: NTP

I found this podcast to be scary. We have a lot of FLOSS software out there that’s key to everything working correctly and it really sounds like the NTP project needs help.

Multiple Vagrant VMs in One Vagrantfile

One of the things I love about Vagrant is how it allows you to quickly create a VM that is very close to your production environment (or better yet EXACTLY like it). We’re starting to work on scaling STAGES from a single server to multiple servers so I’m using Vagrant as the test bed for this process. Because of this we need to work with multiple VMs in the same Vagrant file which isn’t covered by most tutorials.
Continue reading

traceroute Bad.Horse

I’m amazed at what you do with all these TLDs now. I would love to know how this is setup because I’m guessing they don’t have all these routes setup as individual servers.

$ traceroute
traceroute to (, 64 hops max, 52 byte packets
11 (  49.889 ms  43.647 ms  56.112 ms
12 (  45.896 ms  67.432 ms  63.962 ms
13 (  833.709 ms  59.710 ms  54.396 ms
14 (  814.477 ms  65.076 ms  72.313 ms
15 (  845.153 ms  65.974 ms  71.903 ms
16  he.rides.across.the.nation (  1005.514 ms  76.433 ms  70.260 ms
17  the.thoroughbred.of.sin (  78.030 ms  84.778 ms  82.103 ms
18 (  81.958 ms  91.702 ms  89.762 ms
19 (  78.926 ms  111.493 ms  121.994 ms
20  it.needs.evaluation (  1089.204 ms  119.346 ms  86.235 ms
21  * (  824.353 ms  109.227 ms
22  a.heinous.crime (  395.029 ms  109.385 ms  103.859 ms
23 (  894.271 ms  101.942 ms  816.086 ms
24 (  151.219 ms  120.066 ms  112.940 ms
25 (  830.347 ms  126.804 ms *
26 (  831.879 ms  124.121 ms  829.909 ms
27 (  153.145 ms  121.823 ms  120.593 ms
28  he-s.bad (  794.691 ms  128.833 ms  963.309 ms
29  the.evil.league.of.evil (  874.891 ms  130.897 ms  996.284 ms
30 (  1015.256 ms  138.584 ms  136.056 ms
31 (  823.512 ms  140.524 ms  958.807 ms
32 (  985.993 ms  170.036 ms  1126.852 ms
33 (  764.192 ms  148.757 ms  875.543 ms
34 (  154.182 ms  159.267 ms  157.833 ms
35  o_o (  987.712 ms  693.894 ms  260.516 ms
36  you-re.saddled.up (  170.334 ms  221.692 ms  907.964 ms
37 (  169.672 ms  182.466 ms  900.873 ms
38  it-s.hi-ho.silver (  174.726 ms  187.102 ms  176.050 ms
39 (  773.483 ms  180.166 ms  789.419 ms


Quick Tip: Finding When Code Was Deleted In Your Git Repo

Several months ago I deleted a functions because we didn’t think we needed it any more. Today I found out I was wrong but I couldn’t remember when I deleted it or I could just check the commit and pull the function back in. In order to find the commit where the code was deleted you can use the following command:

$ git log -SfunctionNameHere
commit 60b42b9d06dc8a046d338fddf99548f056c2305c
Author: Scott Keck-Warren <>
Date:   Sun Mar 16 11:45:41 2014 -0400

    Renamed String class to StringObject

Then to see the code that was changed you can use:

$git show 60b42b9d06dc8a046d338fddf99548f056c2305c
diff --git a/PHPO/String.php b/PHPO/String.php
deleted file mode 100644
index f87926b..0000000
--- a/PHPO/String.php
+++ /dev/null
@@ -1,63 +0,0 @@
-namespace PHPO;
-use PHPO\ArrayObject;

Quick Tip: Wrap Your SQL Queries In Transactions

I found this to be amazing so I thought I would share it.

If you’re running a query that might cause data loss on the fly (maybe a delete or an update) you can wrap the query in a transaction to make sure you don’t mess up data:

start transaction;
update table set thing=1 where 1=1;
-- Double check results here.

-- or

Learned via reddit

Debugging Zend_Ldap on a Production Server

We’re using Zend_Ldap to authenticate users using LDAP on a project. One of the clients we setup was having a problem getting the connection to work where our web server would connect to their LDAP server and then it would pause for 30 minutes before returning an error. To debug this you set the following option:

ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);

Then you would just call ldap_error to get the debug information. We didn’t want random bugs listed on our server but it turns out that with this set the debug settings are logged to the php.log.

Quick Tip: Limiting the Number of Records From mysqldump

I’ve talked about how you can dump only selected records using mysqldump. The other day I didn’t have a specific parameter I was filtering on I just needed the first 1000 records from a table. To do this you can use the following “hack”:

mysqldump -uroot -ppassword databaseName tableName --where='1 limit 1000'

Using Ansible with Vagrant and Windows

I’ve been experimenting with Ansible for new server setup and I was amazed to see Vagrant supports it out of the box (I guess I shouldn’t be Vagrant is a great piece of software). When I tried to use it on my Windows laptop I received the following error:

> vagrant up test
Bringing machine 'test' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix the following errors and try again:

ansible provisioner:
* `playbook` for the Ansible provisioner does not exist on the host system: C:/path/playbook.yml

I said to myself:

It’s okay I’ll just install ansible on Windows. How hard could it be?

It turns out it’s not simple and I don’t really want to have to do this on all our computers. I know it seems like a small amount of work but it adds up.

The fix for this was for me to run the playbook inside the VM. First I setup the Vagrantfile to run a shell script:

config.vm.provision :shell, :inline =>

Then inside the shell script we’re going to install ansible (if the ansible-playbook executable doesn’t exist) and then we’re going to run the playbook.

if [ ! -f /usr/bin/ansible-playbook ]
    apt-get install software-properties-common
    apt-add-repository ppa:ansible/ansible
    apt-get update
    apt-get install -y ansible

ansible-playbook --inventory="localhost," -c local  /path/to/ansible/playbook.yml

By using the -c local we’re telling anisble to make a local connection and not use SSH because then we would need to setup keys and that seems like a lot of unnecessary work. :-)