Temporary `ufw` rules or How I learned to stop scripting and love the shell

By Josh Sherman
5 min read
development
linux
ubuntu
security
bash

This post was originally planned to be a social commentary on the potential for riots this coming Novemeber (a/k/a The 2013 Food Stamp Riots a/k/a The Backlash of the Entitlement Society) but that seemed like such a fucking downer. Then the post was supposed to be about a Python script […]

Split an array into chunks with PHP

By Josh Sherman
5 min read
development
php

Array chunking is a great way to paginate large arrays and as I found out recently, makes it very easy to map a large array from Redis (by way of mget and/or pipelining) back to the original data. Chunking an array is the process of taking an array and splitting […]

Were termites the least of our problems?

By Josh Sherman
7 min read
reviews

I’m definitely starting to think so at this point. If you’re not aware, last week our house was tented for termites and we took a mini vacation to New Orleans. What most don’t know is that this tenting was over a year in the making. Let’s back it up to […]

Shuffle an associative array with PHP

By Josh Sherman
1 min read
development
php

PHP makes it really easy to randomize the order of an array with the shuffle() function. If you’ve ever used this function on an associative array you know that the array will be randomized, but the keys will be dropped. It takes a bit more work, but you can randomize […]

New Orleans is more than just Mardi Gras you know

By Josh Sherman
1 min read
reviews
vacation

Blogging from the French Quarter in New Orleans today. A recent bout of termite infestation has left us with a circus tent full noxious gas enclosing our house and no place to call home for a few days. We were originally going to stay down in Ybor City which is […]