Posts by Category
Category: electronics projects
Arduino Project 7: Buzzword

August 23, 2015 - Categories: Electronics Projects,How-to Guides
3 minute read
A “Catch Phrase” clone I built with an Arduino and TFT Touch Screen
Arduino Project 6: Unlock it with Fire

July 12, 2015 - Categories: Electronics Projects,How-to Guides
5 minute read
A lock box that can only be opened with a different kind of key
Powering a Raspberry Pi

December 18, 2013 - Categories: How-to Guides,Questions for the Community,Electronics Projects
3 minute read
I recently started building out a combination NAS and HTPC on a Raspberry Pi and came across some interesting information about powering Raspberry Pi's. While this isn't a project post per se, I thought it was interesting enough to share and wanted to send this out as sort of a PSA for the users out there who don't know the potential danger of "backpowering" a Raspberry Pi.
Arduino Project 4: Tilt To Unlock

February 7, 2013 - Categories: Electronics Projects,How-to Guides
7 minute read
This is my favorite Arduino project to date. After some basic experimenting with an accelerometer, I had an idea. What if you used the accelerometer to look for a combination of movements? Instead of using a combination lock or a traditional key lock, you could just tilt the object in a set pattern to unlock it. Here's what I ended up with:
Arduino Project 3: Accelerometer Primer

January 21, 2013 - Categories: Electronics Projects,IT/Software Projects,How-to Guides
2 minute read
This project is more of a warm-up than a full-blown project. I wanted to get a feel for the basic workings of an accelerometer in preparation for a larger undertaking (no spoilers!). I borrowed this project idea from a forum about Arduino and accelerometers but can't remember which forum, so I can't credit back to the original poster - sorry about that.
Before we get to the how, let's take a look at the what. Basically we have an accelerometer and 5 LEDs mounted on a breadboard. Four of the LEDs are mounted to correspond with the X and Y accelerometer axes and one LED is in the middle. When the accelerometer is level, only the middle LED is illuminated. If you tilt the accelerometer to the side, the LED on that side is illuminated.
Arduino Project 2: The Audible Eye Part 2

January 9, 2013 - Categories: Electronics Projects,How-to Guides
3 minute read
Alright, if you're following along from Part 1, you should have your headphones/speakers as well as your ultrasonic rangefinder wired up and operational. Next we have to write the code to marry these two devices.
The Code
Arduino Project 2: The Audible Eye Part 1

January 7, 2013 - Categories: Electronics Projects,How-to Guides
4 minute read
The Audible Eye is a short proof-of-concept project that I came up with while looking for ways to experiment with some new gear. The idea of combining an ultrasonic rangefinder and some sort of signaling audio output jumped out to me - it would give you a depth perception, not unlike echo location that bats and dolphins use. As far as practical use, I believe it could be used by the visually impaired as a complement to a white cane, but not as a replacement.
Basically, the tone/pitch of the audio signal would get higher as the operator moves closer to a wall or object, indicating to the operator that they are getting closer. Similarly, as the operator moves away from the wall the tone will drop until it's almost inaudible.
Let me provide some context to make this more clear. Let's imagine our operator is blindfolded. If the operator pointed the device down an empty hallway for example, they would hear almost no tone, telling them it's safe to walk forward. As they approached a wall, the tone would increase. The operator would then scan around them with the device, find another path that was unobstructed, and could continue walking.
This video is all but unwatchable (quality is IMPRESSIVELY bad), but it will at least give you an idea of how it works. And of course I disassembled the project before I realized the video was botched.
Category: how-to guides
BASH Hacks as First Class Commands
May 11, 2017 - Categories: How-to Guides,Utilities And Other Useful Things,IT/Software Projects
1 minute read
In my new job at Zendesk, I deal with a lot of Ruby projects that leverage bundler for dependency management. Specifically, right now I’m working with SparkleFormation, stack_master, and aws-vault. With that toolset, each command starts with a staggering 43 static characters that don’t change between commands, like this:
Dennis Nedry Failed Login

March 11, 2017 - Categories: How-to Guides,Utilities And Other Useful Things,IT/Software Projects
less than 1 minute read
This one’s a short read, as most of the code and the concept was adopted from the jQuery Raptorize plugin. Basically, I was admiring the Raptorize plug-in and thought how funny it would be to have Dennis Nedry pop up and deliver his famous line, “Ah ah ah, you didn’t say the magic word!” whenever you had a failed login. Thanks to the jQuery Raptorize plugin, the majority of the work was done. I just needed a picture of Dennis Nedry, an mp3 file for the audio, and tweak the code slightly. Then I put together a fake login page to demo the whole thing.
The Move to Jekyll

March 4, 2017 - Categories: IT/Software Projects,How-to Guides
6 minute read
WordPress has served me well over the years, but it’s time for me to move on. My blog first started with Wordpress.com hosting, but I didn’t like that I was hosting WP’s ads, a custom domain was an up-charge, and they limit which themes and plugins I could use. So I migrated to a self-hosted WordPress instance, allowing me to serve Google ads, add membership functionality, and allow people to subscribe to my site by email.
Removing Secrets from GitHub

February 16, 2017 - Categories: How-to Guides
4 minute read
Is it secret?! Is it safe?!
What to do when you’ve committed keys, secrets, passwords, and/or other sensitive information to GitHub or any public Git repo
YouPassButter Slack Bot, Part 2

February 4, 2017 - Categories: IT/Software Projects,How-to Guides
11 minute read
In part 2, we add dynamic meme generation, OAuth configuration, and re-structure our API to support more Slash commands.
YouPassButter Slack Bot, Part 1

January 7, 2017 - Categories: IT/Software Projects,How-to Guides
6 minute read
A dirt simple Slack bot primer, using Ruby, Sinatra, Heroku, and Slash commands
Issues with AWS CodeDeploy and CIS hardening

October 22, 2015 - Categories: How-to Guides
2 minute read
I've been using AWS CodeDeploy for some time now and it's really an awesome service. If you're hosting your application in AWS and not using CodeDeploy you're missing out.
If you want to use CodeDeploy yet but you just don't know how, check out my in-depth AWS CodeDeploy course.
I had been successfully using CodeDeploy for an app at work for a few months when I was told we had to switch to using Linux AMI's that were 'hardened' to meet CIS benchmarks for security. No problem right? I redeployed the app stack with the CIS-hardened AMI and worked through a few bugs that came out of it.
However, when I went tried to execute my CodeDeploy deployment it died with an error claiming that it couldn't access the "patch.sh" file due to permissions. I logged on to the instance, cd'd into the CodeDeploy directory, and didn't notice anything obviously wrong with the permissions.
Arduino Project 7: Buzzword

August 23, 2015 - Categories: Electronics Projects,How-to Guides
3 minute read
A “Catch Phrase” clone I built with an Arduino and TFT Touch Screen
Arduino Project 6: Unlock it with Fire

July 12, 2015 - Categories: Electronics Projects,How-to Guides
5 minute read
A lock box that can only be opened with a different kind of key
Share Your Salary App Part 3

February 23, 2015 - Categories: IT/Software Projects,How-to Guides
18 minute read
So in Part 1 we built the core classes for our app and we exposed those classes as a RESTful web service in Part 2. Now, we'll build a UI and wrap up the project.
Feel free to check out the application first or pull up the source in another window.
Share Your Salary App Part 2

January 29, 2015 - Categories: IT/Software Projects,How-to Guides
6 minute read
In Part 1, I covered the core classes for the Share Your Salary application. These classes covered my Model and Controllers in my quasi-MVC application. Now we're ready to expose those controller functions via a RESTful API.
Share Your Salary App Part 1
January 23, 2015 - Categories: IT/Software Projects,How-to Guides
7 minute read
In a previous project, I built "Who's that person in that thing?," a JavaScript web app that called The Movie DB's API to find common actors given two movies. That was fun, but I still wanted to build an API service myself and I wanted to experiment with some new tools. But first I needed a project idea as an excuse to use them.
Project Idea/Application Premise/The Excuse
People are funny about money, especially about their salary. With most people, it's a taboo to talk about it. But everyone's been curious at some point to know how they compare to their peers. Some people fear they are getting paid less to do the same work as others, and sometimes that fear is founded in fact. The "Share Your Salary" app is an anonymous salary survey tool to address these kinds of use cases.
Before we get into any of the tools or how-to, feel free to check out the application first or look over the source.
MongoDB and PHP Primer
January 8, 2015 - Categories: IT/Software Projects,How-to Guides
4 minute read
I recently used MongoDB in the Share Your Salary app and had a few hiccups as I tried to blunder my way through learning how to use it. MongoDB, like many NoSQL document databases, uses JavaScript Object Notation or JSON to represent the objects/documents. JSON is great, especially when you're using JavaScript in conjunction. PHP, however, doesn't 'speak' JSON natively; it uses arrays instead, and this makes for some less than intuitive interactions. This post will go over some of the basic CRUD operations using PHP against a MongoDB.
Introduction to OpenShift

January 3, 2015 - Categories: How-to Guides,Utilities And Other Useful Things
4 minute read
OpenShift is a Platform-as-a-Service offering provided by Red Hat. It's built on top of Linux containers (which they refer to as 'gears') hosted in Amazon's Amazon Web Services (AWS). They offer many different platforms such as PHP/Apache, JBoss, Tomcat, NodeJS, Python, Ruby-on-Rails, and many more. OpenShift refers to these pre-built platforms as 'cartridges.'
Download All Files From A Site With wget

December 2, 2014 - Categories: How-to Guides,Utilities And Other Useful Things
6 minute read
I recently got a membership to a site hosting a boatload of private label rights (PLR) material (IDPLR.com). 99% of PLR items are scams, garbage, or are outdated, but if you have the time or tools to dig through it you can find some gems. (Just so we're clear, I'm not running any scams, I was just looking for some content for another project). Anyway, I got access to the site that had thousands of zip files but obviously didn't want to download them one by one. Administrator wouldn't give me any way to download the files in bulk either, so I was left with no choice but to automate...
Bootstrap Scrollspy Workaround
June 16, 2014 - Categories: IT/Software Projects,How-to Guides
10 minute read
I was recently working on a new HTML project when I came across the Scrollspy feature in Bootstrap's framework (v2.3). The feature looks really good on Bootstrap's pages, I figured I'd use it in my project as well. I immediately had issues with the links aligning the content to the viewport and issues with the scrollspy highlighting the right link based on what content was in the viewport. This was all supposed to be out of the box functionality... After doing some research (read: Googling), I came across a few bug tickets and workarounds, but no wholistic solutions to reproducing the functionality on Bootstrap's site. So I decided to build it manually.
Raspberry Pi Project 1: NAS and XBMC
January 4, 2014 - Categories: IT/Software Projects,How-to Guides
9 minute read
The Raspberry Pi makes a great HTPC or media PC, whatever you want to call it, because of its low cost, low power consumption, quiet, and small form factor. As I was getting ready to start my Raspberry Pi build, I realized that the Pi could take over a few other functions that my desktop does, including NAS, at a fraction of the cost (see my previous post about Powering a Pi and related utility savings). But could I modify a RaspXBMC build to also run Samba or some other network file sharing? Could XBMC be installed on Raspbian with less than a thousand calls to aptitude? Could XBMC and Samba run simultaneously on a Pi without making video playback unwatchable? That's what I hoped to find out.
Powering a Raspberry Pi

December 18, 2013 - Categories: How-to Guides,Questions for the Community,Electronics Projects
3 minute read
I recently started building out a combination NAS and HTPC on a Raspberry Pi and came across some interesting information about powering Raspberry Pi's. While this isn't a project post per se, I thought it was interesting enough to share and wanted to send this out as sort of a PSA for the users out there who don't know the potential danger of "backpowering" a Raspberry Pi.
New Site Launch + 6 WordPress.com Migration Tips

March 10, 2013 - Categories: How-to Guides
4 minute read
Like all good things, my time on WordPress.com's hosting has come to an end. Don't get me wrong - anyone toying with the idea for a blog should strongly consider it, as it's well-managed and does 90% of what any user needs it to do. It's a powerful tool for the uninitiated...
Arduino Project 5: Internet Control without Ethernet Shield
February 18, 2013 - Categories: IT/Software Projects,How-to Guides,Utilities And Other Useful Things
3 minute read
I'm getting ready to start an Arduino home automation project, so I started looking at ways to interface with an Arduino across the internet. That way I'll be able to control all of the lights, locks, etc. anywhere I have internet access.
Now, the obvious answer was to buy an Ethernet shield, but I already run a home web server so that seemed unnecessary. I saw a few solutions using Processing or Python scripts, but that seemed unnecessarily complicated. It took a fair amount of digging and brainstorming, but I've found an ultra-easy, ultra-flexible, and ultra-fast solution. Ultra.
Arduino Project 4: Tilt To Unlock

February 7, 2013 - Categories: Electronics Projects,How-to Guides
7 minute read
This is my favorite Arduino project to date. After some basic experimenting with an accelerometer, I had an idea. What if you used the accelerometer to look for a combination of movements? Instead of using a combination lock or a traditional key lock, you could just tilt the object in a set pattern to unlock it. Here's what I ended up with:
Arduino Project 3: Accelerometer Primer

January 21, 2013 - Categories: Electronics Projects,IT/Software Projects,How-to Guides
2 minute read
This project is more of a warm-up than a full-blown project. I wanted to get a feel for the basic workings of an accelerometer in preparation for a larger undertaking (no spoilers!). I borrowed this project idea from a forum about Arduino and accelerometers but can't remember which forum, so I can't credit back to the original poster - sorry about that.
Before we get to the how, let's take a look at the what. Basically we have an accelerometer and 5 LEDs mounted on a breadboard. Four of the LEDs are mounted to correspond with the X and Y accelerometer axes and one LED is in the middle. When the accelerometer is level, only the middle LED is illuminated. If you tilt the accelerometer to the side, the LED on that side is illuminated.
Bootable USB with UNetbootin
January 14, 2013 - Categories: How-to Guides,Utilities And Other Useful Things
1 minute read
OK, so you have a netbook or ultrabook with no optical drive. Or maybe your optical drive is dead. Or maybe you're smart enough to not use optical drives in general. Whatever the situation is, you want to run or install something from a bootable USB drive.
There are lots of solutions out there, but nothing beats the Universal Netboot Installer, or UNetbootin. UNetbootin has a simple GUI and never gives any grief. You can use your own ISO that you've downloaded or use one of the 42 ISOs UNetbootin provides, including BackTrack, CentOS, Ubuntu, as well as several rescue and recovery utilities.
Arduino Project 2: The Audible Eye Part 2

January 9, 2013 - Categories: Electronics Projects,How-to Guides
3 minute read
Alright, if you're following along from Part 1, you should have your headphones/speakers as well as your ultrasonic rangefinder wired up and operational. Next we have to write the code to marry these two devices.
The Code
Arduino Project 2: The Audible Eye Part 1

January 7, 2013 - Categories: Electronics Projects,How-to Guides
4 minute read
The Audible Eye is a short proof-of-concept project that I came up with while looking for ways to experiment with some new gear. The idea of combining an ultrasonic rangefinder and some sort of signaling audio output jumped out to me - it would give you a depth perception, not unlike echo location that bats and dolphins use. As far as practical use, I believe it could be used by the visually impaired as a complement to a white cane, but not as a replacement.
Basically, the tone/pitch of the audio signal would get higher as the operator moves closer to a wall or object, indicating to the operator that they are getting closer. Similarly, as the operator moves away from the wall the tone will drop until it's almost inaudible.
Let me provide some context to make this more clear. Let's imagine our operator is blindfolded. If the operator pointed the device down an empty hallway for example, they would hear almost no tone, telling them it's safe to walk forward. As they approached a wall, the tone would increase. The operator would then scan around them with the device, find another path that was unobstructed, and could continue walking.
This video is all but unwatchable (quality is IMPRESSIVELY bad), but it will at least give you an idea of how it works. And of course I disassembled the project before I realized the video was botched.
Monitoring Disks in RAID Array in Windows 7
December 5, 2012 - Categories: How-to Guides,Utilities And Other Useful Things
2 minute read
For many folks whose motherboards don't support RAID or just want a simple, easy to implement RAID solution, software RAID is often the best solution. In Windows 7, Microsoft finally got around to providing out-of-the-box software RAID capabilities (apparently you could do it in Windows XP, but not without some real leg work). Only problem is Microsoft didn't include a notification or alarm mechanism to deal with disk failures. The only notification is a passive entry in the Event Log, which is not obvious for basic users and not really convenient for anyone. This effectively defeats the purpose of RAID as a mechanism for data redundancy, as your disks could fail one by one until all of your data was unrecoverable, and you as the user wouldn't realize until it was too late.
Prevent SQL Injection Attacks in PHP Applications

November 26, 2012 - Categories: How-to Guides,Utilities And Other Useful Things
4 minute read
Be advised This post is quite old (26 Nov 2012) and any code may be out of date. Proceed with caution.
Easy Modal Overlays

November 21, 2012 - Categories: IT/Software Projects,How-to Guides
2 minute read
Be advised This post is quite old (21 Nov 2012) and any code may be out of date. Proceed with caution.
Making Your Site Mobile-Friendly

November 19, 2012 - Categories: How-to Guides
3 minute read
Be advised This post is quite old (19 Nov 2012) and any code/references may be out of date. Proceed with caution.
Konami Code
November 16, 2012 - Categories: IT/Software Projects,How-to Guides
2 minute read
The Konami code... if you were born in 1990 or earlier, and play (or played) video games, you probably already know what I'm talking about.
The history of the Konami code is awesome in it's own rite. Here's the short version: the Konami code is a famous cheat code (up, up, down, down, left, right, left, right, B, A) that first appeared in NES games like Contra. Many times the code was added to video games as a tribute to the classic games or as a tribute to Kazuhisa Hashimoto, the developer who accidentally left the cheat code in the game when it was sold to the public.
Google Hacking
November 14, 2012 - Categories: IT/Software Projects,How-to Guides
2 minute read
When I was still working at the University of Wisconsin, a co-worker of mine showed me a way to find unprotected directories indexed by Apache and web cameras. Not those kind of web cam feeds - these are usually security cameras in innocuous places, like restaurants, streets, tops of buildings... etc., that are so benign (usually) that whoever set them up decided they didn't need to be secured (or didn't know how to secure them).
Anyway, the way he found these was the interesting part. At the time, it was termed "Google Hacking" although now it is sometimes called "Google dorking." It is simply using Google to find unsecured web content with targeted search terms.
Posting Source Code in Wordpress
November 12, 2012 - Categories: How-to Guides
1 minute read
This one is pretty much a no-brainer, but I wasn't aware of it until very recently so I thought I'd share.
Source code, as you've probably seen on lots of web pages, is treated special. And for good reasons, like readability, syntax highlighting, and to protect against the use of formatted instead of plain-text characters.
Deleting Files Based on System Timestamp
November 10, 2012 - Categories: How-to Guides,Utilities And Other Useful Things
2 minute read
Recently ran into an issue at work where a single database was creating A LOT of trace files. 54 gigabytes of trace files to be specific. Well, this was a problem because the system disk was only 56GB, preventing me from building new databases. No problem, its a dev environment, I'll just delete the trace files that are older than 3 days. Except that the trace file naming convention wasn't consistent, so there was no way for me to delete the oldest files based only on file name.
What about the system timestamp on each file? It seemed like a good solution, but I didn't want to write a shell script to do something so minor. Then I got lucky on Google, and found this useful little gem:
Simple Page-of-Posts Solution for Wordpress

November 4, 2012 - Categories: How-to Guides,Utilities And Other Useful Things
1 minute read
Be advised This post is quite old (04 Nov 2012) and any code may be out of date. Proceed with caution.
Arduino Project 1: Heat Seeking Robot (Part 1.5)

August 23, 2012 - Categories: IT/Software Projects,How-to Guides
10 minute read
Be advised This post is quite old (23 Aug 2012) and any code may be out of date. Proceed with caution.
Category: it/software projects
What’s pass-reference-by-value?
August 14, 2020 - Categories: IT/Software Projects
6 minute read
I’m not an authority on this - take my explanation with a grain of skepticism and do your own research.
I’ve been working on going over some of the fundamentals of computer science recently since I don’t have a traditional computer science education. Pass-by-value recently came up, and I thought it would be a quick foray to properly learn the difference between pass-by-value and pass-by-reference. Surely something so fundamental must have clear answers, right?
And then it turned into a huge fucking rabbit hole, with lots of dissenting views, and very confusing discussions. Just Google it, check out some of the StackOverflow articles. There’s a lot of content, but it’s not very clear. In the abstract, the concepts are simple. In the context of Python and Ruby, it’s a confusing mess.
So that’s what this post is about - trying to clarify the differences between the two and define what “pass-reference-by-value” actually means.
Linkets - A Zendesk App

October 29, 2017 - Categories: IT/Software Projects
2 minute read
It’s official! Linkets has been formally published on the Zendesk App marketplace - go check it out!
One of the coolest things about Zendesk (both the company and the software itself) is how developer-friendly it is. The API is well documented and powerful, and they even provide an App Framework that allows you to develop “widgets” that are displayed in the standard Zendesk UIs. Full disclosure, I currently work at Zendesk.
Zendesk Support has a ton of features, but doesn’t have the ability to link related tickets. There is a Linked Ticket app you can install for free, but this only allows you to create new tickets, and only as a child ticket. Want to link to an existing ticket? Too bad. Need to support relationships other than parent/child? Too bad. I want people to use and love Zendesk, so I decided to take a crack at my own version of the linked ticket app. I titled my app “Linkets.”
DNSReRoute - A Full SaaS Platform

May 21, 2017 - Categories: IT/Software Projects
19 minute read
Dec 28 2017 Update OpenShift deprecated their original offering, so the API backend is completely dead. All functionality in the single page app (besides the Auth0 integration) is now broken.
About a year ago, I had a use case for a simple redirect. I just needed to redirect developers from an old Jenkins DNS record (that pointed to an instance that was destroyed) to a new DNS record (pointing to the new, running Jenkins instance). Now this is a trivial task if you want to run NGINX or Apache, but becomes more challenging if you want to avoid that overhead. I tried hosting a simple JavaScript redirect using S3, but the bucket obviously didn’t match my DNS name, so that didn’t work. Route53 doesn’t support HTTP redirects. I was at a loss - how could something so trivial require a whole web server to accomplish?
BASH Hacks as First Class Commands
May 11, 2017 - Categories: How-to Guides,Utilities And Other Useful Things,IT/Software Projects
1 minute read
In my new job at Zendesk, I deal with a lot of Ruby projects that leverage bundler for dependency management. Specifically, right now I’m working with SparkleFormation, stack_master, and aws-vault. With that toolset, each command starts with a staggering 43 static characters that don’t change between commands, like this:
Dennis Nedry Failed Login

March 11, 2017 - Categories: How-to Guides,Utilities And Other Useful Things,IT/Software Projects
less than 1 minute read
This one’s a short read, as most of the code and the concept was adopted from the jQuery Raptorize plugin. Basically, I was admiring the Raptorize plug-in and thought how funny it would be to have Dennis Nedry pop up and deliver his famous line, “Ah ah ah, you didn’t say the magic word!” whenever you had a failed login. Thanks to the jQuery Raptorize plugin, the majority of the work was done. I just needed a picture of Dennis Nedry, an mp3 file for the audio, and tweak the code slightly. Then I put together a fake login page to demo the whole thing.
The Move to Jekyll

March 4, 2017 - Categories: IT/Software Projects,How-to Guides
6 minute read
WordPress has served me well over the years, but it’s time for me to move on. My blog first started with Wordpress.com hosting, but I didn’t like that I was hosting WP’s ads, a custom domain was an up-charge, and they limit which themes and plugins I could use. So I migrated to a self-hosted WordPress instance, allowing me to serve Google ads, add membership functionality, and allow people to subscribe to my site by email.
YouPassButter Slack Bot, Part 2

February 4, 2017 - Categories: IT/Software Projects,How-to Guides
11 minute read
In part 2, we add dynamic meme generation, OAuth configuration, and re-structure our API to support more Slash commands.
YouPassButter Slack Bot, Part 1

January 7, 2017 - Categories: IT/Software Projects,How-to Guides
6 minute read
A dirt simple Slack bot primer, using Ruby, Sinatra, Heroku, and Slash commands
Share Your Salary App Part 3

February 23, 2015 - Categories: IT/Software Projects,How-to Guides
18 minute read
So in Part 1 we built the core classes for our app and we exposed those classes as a RESTful web service in Part 2. Now, we'll build a UI and wrap up the project.
Feel free to check out the application first or pull up the source in another window.
Share Your Salary App Part 2

January 29, 2015 - Categories: IT/Software Projects,How-to Guides
6 minute read
In Part 1, I covered the core classes for the Share Your Salary application. These classes covered my Model and Controllers in my quasi-MVC application. Now we're ready to expose those controller functions via a RESTful API.
Share Your Salary App Part 1
January 23, 2015 - Categories: IT/Software Projects,How-to Guides
7 minute read
In a previous project, I built "Who's that person in that thing?," a JavaScript web app that called The Movie DB's API to find common actors given two movies. That was fun, but I still wanted to build an API service myself and I wanted to experiment with some new tools. But first I needed a project idea as an excuse to use them.
Project Idea/Application Premise/The Excuse
People are funny about money, especially about their salary. With most people, it's a taboo to talk about it. But everyone's been curious at some point to know how they compare to their peers. Some people fear they are getting paid less to do the same work as others, and sometimes that fear is founded in fact. The "Share Your Salary" app is an anonymous salary survey tool to address these kinds of use cases.
Before we get into any of the tools or how-to, feel free to check out the application first or look over the source.
MongoDB and PHP Primer
January 8, 2015 - Categories: IT/Software Projects,How-to Guides
4 minute read
I recently used MongoDB in the Share Your Salary app and had a few hiccups as I tried to blunder my way through learning how to use it. MongoDB, like many NoSQL document databases, uses JavaScript Object Notation or JSON to represent the objects/documents. JSON is great, especially when you're using JavaScript in conjunction. PHP, however, doesn't 'speak' JSON natively; it uses arrays instead, and this makes for some less than intuitive interactions. This post will go over some of the basic CRUD operations using PHP against a MongoDB.
Who’s that person in that thing? App

July 28, 2014 - Categories: IT/Software Projects
less than 1 minute read
I've been looking for an API project for awhile now, either to write an API service or a client/app that consumes one. Then I finally thought of a use case - an app that would allow you to find an actor based on two movies they've been in, using only JavaScript and APIs. It took me awhile to find a movie API service that was free and suited my purposes, then I found TheMovieDB (which has a pretty sweet API actually and is free to use). Check out the demo and grab the source from GitHub if you want to do something similar.
Bootstrap Scrollspy Workaround
June 16, 2014 - Categories: IT/Software Projects,How-to Guides
10 minute read
I was recently working on a new HTML project when I came across the Scrollspy feature in Bootstrap's framework (v2.3). The feature looks really good on Bootstrap's pages, I figured I'd use it in my project as well. I immediately had issues with the links aligning the content to the viewport and issues with the scrollspy highlighting the right link based on what content was in the viewport. This was all supposed to be out of the box functionality... After doing some research (read: Googling), I came across a few bug tickets and workarounds, but no wholistic solutions to reproducing the functionality on Bootstrap's site. So I decided to build it manually.
Raspberry Pi Project 1: NAS and XBMC
January 4, 2014 - Categories: IT/Software Projects,How-to Guides
9 minute read
The Raspberry Pi makes a great HTPC or media PC, whatever you want to call it, because of its low cost, low power consumption, quiet, and small form factor. As I was getting ready to start my Raspberry Pi build, I realized that the Pi could take over a few other functions that my desktop does, including NAS, at a fraction of the cost (see my previous post about Powering a Pi and related utility savings). But could I modify a RaspXBMC build to also run Samba or some other network file sharing? Could XBMC be installed on Raspbian with less than a thousand calls to aptitude? Could XBMC and Samba run simultaneously on a Pi without making video playback unwatchable? That's what I hoped to find out.
HTML5 Canvas and a Horace Dediu-esque Chart

May 13, 2013 - Categories: IT/Software Projects,Utilities And Other Useful Things
9 minute read
A few months back, I came across this chart illustrating Apple's segment revenues on Reddit:
This is a great chart because it has impact with just a glance, and yet yields more solid data the longer you examine it. Ever since I saw this chart I wanted to build my own for my department, for startups, and offer it up to anyone else who might want to build a similar chart.
Horace Dediu of Asymco.com put this together using a chart-building iPad app called Perspective. Now, I should have just downloaded the damn app and made some similar charts and been happy. Instead I built my own from scratch using HTML5's canvas tag. Check out the demo.
Web Scraping, PHP, and Wheel of Fortune
April 17, 2013 - Categories: IT/Software Projects
4 minute read
Be advised This post is quite old (17 Apr 2013) and any code may be out of date. Proceed with caution.
My fiancee loves Wheel of Fortune and watches whenever she can. The clever folks over at Sony (producers of Wheel of Fortune) introduced a loyalty program called "Wheel Watchers." People who sign up get a "Spin ID," and if your Spin ID is chosen for a given episode, you win one of the prizes they gave away on the show. Only catch is you have to watch every night.
This is a lot of random background information, but there's a reason. My fiancee asked me to write an application that would check the Spin ID every day and notify us if we won. This seemed like a great reason to learn some web scraping with PHP (although you could probably do this in just about any language).
To Do List App

April 3, 2013 - Categories: Utilities And Other Useful Things,IT/Software Projects
2 minute read
Be advised This post is quite old (03 Apr 2013) and any code may be out of date. Proceed with caution.
Update Feb 2017 I’ve happily used this TODO app for the past ~4 years, but I’m taking it down with the rest of my old PHP hosting. In conjunction, I’ve removed the demo-related content from this post. For anyone interested, I’m now using Wunderlist
Arduino Project 5: Internet Control without Ethernet Shield
February 18, 2013 - Categories: IT/Software Projects,How-to Guides,Utilities And Other Useful Things
3 minute read
I'm getting ready to start an Arduino home automation project, so I started looking at ways to interface with an Arduino across the internet. That way I'll be able to control all of the lights, locks, etc. anywhere I have internet access.
Now, the obvious answer was to buy an Ethernet shield, but I already run a home web server so that seemed unnecessary. I saw a few solutions using Processing or Python scripts, but that seemed unnecessarily complicated. It took a fair amount of digging and brainstorming, but I've found an ultra-easy, ultra-flexible, and ultra-fast solution. Ultra.
WordPress: Twenty Eleven Child Theme with Galleria Slider

January 28, 2013 - Categories: IT/Software Projects,Utilities And Other Useful Things
less than 1 minute read
OK - I've been spending the last few hours getting acquainted with the WordPress backend (that sounds more risque than I had intended) and making my first custom 'child' theme.
If you have an interest in making custom themes and you're just getting started, I've got a few very generic tips:
Arduino Project 3: Accelerometer Primer

January 21, 2013 - Categories: Electronics Projects,IT/Software Projects,How-to Guides
2 minute read
This project is more of a warm-up than a full-blown project. I wanted to get a feel for the basic workings of an accelerometer in preparation for a larger undertaking (no spoilers!). I borrowed this project idea from a forum about Arduino and accelerometers but can't remember which forum, so I can't credit back to the original poster - sorry about that.
Before we get to the how, let's take a look at the what. Basically we have an accelerometer and 5 LEDs mounted on a breadboard. Four of the LEDs are mounted to correspond with the X and Y accelerometer axes and one LED is in the middle. When the accelerometer is level, only the middle LED is illuminated. If you tilt the accelerometer to the side, the LED on that side is illuminated.
Easy Modal Overlays

November 21, 2012 - Categories: IT/Software Projects,How-to Guides
2 minute read
Be advised This post is quite old (21 Nov 2012) and any code may be out of date. Proceed with caution.
Konami Code
November 16, 2012 - Categories: IT/Software Projects,How-to Guides
2 minute read
The Konami code... if you were born in 1990 or earlier, and play (or played) video games, you probably already know what I'm talking about.
The history of the Konami code is awesome in it's own rite. Here's the short version: the Konami code is a famous cheat code (up, up, down, down, left, right, left, right, B, A) that first appeared in NES games like Contra. Many times the code was added to video games as a tribute to the classic games or as a tribute to Kazuhisa Hashimoto, the developer who accidentally left the cheat code in the game when it was sold to the public.
Google Hacking
November 14, 2012 - Categories: IT/Software Projects,How-to Guides
2 minute read
When I was still working at the University of Wisconsin, a co-worker of mine showed me a way to find unprotected directories indexed by Apache and web cameras. Not those kind of web cam feeds - these are usually security cameras in innocuous places, like restaurants, streets, tops of buildings... etc., that are so benign (usually) that whoever set them up decided they didn't need to be secured (or didn't know how to secure them).
Anyway, the way he found these was the interesting part. At the time, it was termed "Google Hacking" although now it is sometimes called "Google dorking." It is simply using Google to find unsecured web content with targeted search terms.
Arduino Project 1: Heat Seeking Robot (Part 1.5)

August 23, 2012 - Categories: IT/Software Projects,How-to Guides
10 minute read
Be advised This post is quite old (23 Aug 2012) and any code may be out of date. Proceed with caution.
Arduino Project 1: Heat Seeking Robot (Part 1)

July 21, 2012 - Categories: IT/Software Projects
3 minute read
Be advised This post is quite old (21 Jul 2012) and any code may be out of date. Proceed with caution.
Category: questions for the community
Chef and iptables
July 14, 2014 - Categories: Questions for the Community,Utilities And Other Useful Things
4 minute read
Like many DevOps professionals before me, I needed a way to manage iptables programmatically through Chef. Before I realized that Opscode had written a cookbook for just this, I had already spent some time building my own. The cookbook written by Opscode is very clever and allows you to apply a set of iptables rules with a single line in another recipe. The only problem is that it is predicated on you creating 'templates' of iptables policies you want to apply in advance, and you can only apply those templates. You can't just supply a port number or part of a rule. Additionally, their cookbook wasn't compatible with Vagrant because of the ruby binary wasn't in the paths used in the cookbook.
Short version - I wrote my own iptables cookbook and augmented the Opscode iptables cookbook, and I wanted to share.
Powering a Raspberry Pi

December 18, 2013 - Categories: How-to Guides,Questions for the Community,Electronics Projects
3 minute read
I recently started building out a combination NAS and HTPC on a Raspberry Pi and came across some interesting information about powering Raspberry Pi's. While this isn't a project post per se, I thought it was interesting enough to share and wanted to send this out as sort of a PSA for the users out there who don't know the potential danger of "backpowering" a Raspberry Pi.
Category: utilities and other useful things
BASH Hacks as First Class Commands
May 11, 2017 - Categories: How-to Guides,Utilities And Other Useful Things,IT/Software Projects
1 minute read
In my new job at Zendesk, I deal with a lot of Ruby projects that leverage bundler for dependency management. Specifically, right now I’m working with SparkleFormation, stack_master, and aws-vault. With that toolset, each command starts with a staggering 43 static characters that don’t change between commands, like this:
Dennis Nedry Failed Login

March 11, 2017 - Categories: How-to Guides,Utilities And Other Useful Things,IT/Software Projects
less than 1 minute read
This one’s a short read, as most of the code and the concept was adopted from the jQuery Raptorize plugin. Basically, I was admiring the Raptorize plug-in and thought how funny it would be to have Dennis Nedry pop up and deliver his famous line, “Ah ah ah, you didn’t say the magic word!” whenever you had a failed login. Thanks to the jQuery Raptorize plugin, the majority of the work was done. I just needed a picture of Dennis Nedry, an mp3 file for the audio, and tweak the code slightly. Then I put together a fake login page to demo the whole thing.
Introduction to OpenShift

January 3, 2015 - Categories: How-to Guides,Utilities And Other Useful Things
4 minute read
OpenShift is a Platform-as-a-Service offering provided by Red Hat. It's built on top of Linux containers (which they refer to as 'gears') hosted in Amazon's Amazon Web Services (AWS). They offer many different platforms such as PHP/Apache, JBoss, Tomcat, NodeJS, Python, Ruby-on-Rails, and many more. OpenShift refers to these pre-built platforms as 'cartridges.'
Download All Files From A Site With wget

December 2, 2014 - Categories: How-to Guides,Utilities And Other Useful Things
6 minute read
I recently got a membership to a site hosting a boatload of private label rights (PLR) material (IDPLR.com). 99% of PLR items are scams, garbage, or are outdated, but if you have the time or tools to dig through it you can find some gems. (Just so we're clear, I'm not running any scams, I was just looking for some content for another project). Anyway, I got access to the site that had thousands of zip files but obviously didn't want to download them one by one. Administrator wouldn't give me any way to download the files in bulk either, so I was left with no choice but to automate...
HTML Resume Template

July 21, 2014 - Categories: Utilities And Other Useful Things
less than 1 minute read
I'll keep this short since it's not a proper how-to post or lengthy tutorial. I recently discovered a resurgence in the concept of HTML resumes and was thoroughly impressed. As always, I recklessly decided I should take a stab at it myself even though I knew I was out of my depth. Ended up with a half-decent HTML5/responsive/mobile-friendly resume using Bootstrap 2.3 and wanted to share it with the masses. Check out the demo and if you want to build on it, grab the source. Enjoy.
Chef and iptables
July 14, 2014 - Categories: Questions for the Community,Utilities And Other Useful Things
4 minute read
Like many DevOps professionals before me, I needed a way to manage iptables programmatically through Chef. Before I realized that Opscode had written a cookbook for just this, I had already spent some time building my own. The cookbook written by Opscode is very clever and allows you to apply a set of iptables rules with a single line in another recipe. The only problem is that it is predicated on you creating 'templates' of iptables policies you want to apply in advance, and you can only apply those templates. You can't just supply a port number or part of a rule. Additionally, their cookbook wasn't compatible with Vagrant because of the ruby binary wasn't in the paths used in the cookbook.
Short version - I wrote my own iptables cookbook and augmented the Opscode iptables cookbook, and I wanted to share.
Thematic Password Generator
November 2, 2013 - Categories: Utilities And Other Useful Things
1 minute read
I've been wanting to build a thematic password generator for some time. Basically, choose some sort of "theme" and a few password strength parameters, and it will generate random passwords for you. Will come back to update this post and expand on themes shortly.
Wedding Web Site Released

September 29, 2013 - Categories: Utilities And Other Useful Things
1 minute read
For those of you out there planning a wedding, you may have thought about setting up a website. Something to answer those common questions guests may have so that you can focus on all of the other aspects of wedding planning. There are some pretty slick WYSIWYG sites out there like Wedding Wire, The Knot, and Wedding Channel if you want to use a pre-built theme and just punch in your relevant information.
My wife and I couldn't find a theme and a site that fit our needs perfectly so I ended up building one for us.
Querying vCloud Director API with Ruby Script
August 1, 2013 - Categories: Utilities And Other Useful Things
3 minute read
Well it's been awhile since I've posted since I started working on HireUpJob, but this one's good. I recently had a use case where I needed to get the virtual hardware version of a client machine provisioned through vCloud Director. Now, that information is not accessible anywhere on the client machine, so I had to look to the vCloud Director API for it. The process for querying the API also had to be automated for future provisions, so it had to be scripted. Enough back story and context, lets look at the ruby code.
```ruby #Need to import a few ruby packages require ‘net/http’ require ‘uri’ require ‘openssl’ #Here we are ignoring any issues that may arise with SSL certificates OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
HTML5 Canvas and a Horace Dediu-esque Chart

May 13, 2013 - Categories: IT/Software Projects,Utilities And Other Useful Things
9 minute read
A few months back, I came across this chart illustrating Apple's segment revenues on Reddit:
This is a great chart because it has impact with just a glance, and yet yields more solid data the longer you examine it. Ever since I saw this chart I wanted to build my own for my department, for startups, and offer it up to anyone else who might want to build a similar chart.
Horace Dediu of Asymco.com put this together using a chart-building iPad app called Perspective. Now, I should have just downloaded the damn app and made some similar charts and been happy. Instead I built my own from scratch using HTML5's canvas tag. Check out the demo.
To Do List App

April 3, 2013 - Categories: Utilities And Other Useful Things,IT/Software Projects
2 minute read
Be advised This post is quite old (03 Apr 2013) and any code may be out of date. Proceed with caution.
Update Feb 2017 I’ve happily used this TODO app for the past ~4 years, but I’m taking it down with the rest of my old PHP hosting. In conjunction, I’ve removed the demo-related content from this post. For anyone interested, I’m now using Wunderlist
Asynchronous Database Operations with PHP and jQuery
March 26, 2013 - Categories: Utilities And Other Useful Things
8 minute read
Be advised This post is quite old (26 Mar 2013) and any code may be out of date. Proceed with caution.
Arduino Project 5: Internet Control without Ethernet Shield
February 18, 2013 - Categories: IT/Software Projects,How-to Guides,Utilities And Other Useful Things
3 minute read
I'm getting ready to start an Arduino home automation project, so I started looking at ways to interface with an Arduino across the internet. That way I'll be able to control all of the lights, locks, etc. anywhere I have internet access.
Now, the obvious answer was to buy an Ethernet shield, but I already run a home web server so that seemed unnecessary. I saw a few solutions using Processing or Python scripts, but that seemed unnecessarily complicated. It took a fair amount of digging and brainstorming, but I've found an ultra-easy, ultra-flexible, and ultra-fast solution. Ultra.
WordPress: Twenty Eleven Child Theme with Galleria Slider

January 28, 2013 - Categories: IT/Software Projects,Utilities And Other Useful Things
less than 1 minute read
OK - I've been spending the last few hours getting acquainted with the WordPress backend (that sounds more risque than I had intended) and making my first custom 'child' theme.
If you have an interest in making custom themes and you're just getting started, I've got a few very generic tips:
Bootable USB with UNetbootin
January 14, 2013 - Categories: How-to Guides,Utilities And Other Useful Things
1 minute read
OK, so you have a netbook or ultrabook with no optical drive. Or maybe your optical drive is dead. Or maybe you're smart enough to not use optical drives in general. Whatever the situation is, you want to run or install something from a bootable USB drive.
There are lots of solutions out there, but nothing beats the Universal Netboot Installer, or UNetbootin. UNetbootin has a simple GUI and never gives any grief. You can use your own ISO that you've downloaded or use one of the 42 ISOs UNetbootin provides, including BackTrack, CentOS, Ubuntu, as well as several rescue and recovery utilities.
Monitoring Disks in RAID Array in Windows 7
December 5, 2012 - Categories: How-to Guides,Utilities And Other Useful Things
2 minute read
For many folks whose motherboards don't support RAID or just want a simple, easy to implement RAID solution, software RAID is often the best solution. In Windows 7, Microsoft finally got around to providing out-of-the-box software RAID capabilities (apparently you could do it in Windows XP, but not without some real leg work). Only problem is Microsoft didn't include a notification or alarm mechanism to deal with disk failures. The only notification is a passive entry in the Event Log, which is not obvious for basic users and not really convenient for anyone. This effectively defeats the purpose of RAID as a mechanism for data redundancy, as your disks could fail one by one until all of your data was unrecoverable, and you as the user wouldn't realize until it was too late.
Easily Create a Store Locator
November 28, 2012 - Categories: Utilities And Other Useful Things
1 minute read
I had initially set out to build my own custom store locator (just for the learning experience) and post a how-to article for it. I quickly found that this has been done many times before, and Google has a very good tutorial if you want to build your own.
But what if you don't have a database behind your website? What if you don't have any IT staff to support a custom store locator? What if you need an easy solution?
Check out BatchGeo, a free (with ads) hosted store locator service. All you need is a spreadsheet of your locations that you want to map and whatever secondary information you want to display. BatchGeo takes care of mapping the addresses, so you don't have to determine the latitude and longitude values for each address (like in the Google tutorial). You can also group your locations arbitrarily, such as by location type by simply adding another column of data.
Prevent SQL Injection Attacks in PHP Applications

November 26, 2012 - Categories: How-to Guides,Utilities And Other Useful Things
4 minute read
Be advised This post is quite old (26 Nov 2012) and any code may be out of date. Proceed with caution.
Deleting Files Based on System Timestamp
November 10, 2012 - Categories: How-to Guides,Utilities And Other Useful Things
2 minute read
Recently ran into an issue at work where a single database was creating A LOT of trace files. 54 gigabytes of trace files to be specific. Well, this was a problem because the system disk was only 56GB, preventing me from building new databases. No problem, its a dev environment, I'll just delete the trace files that are older than 3 days. Except that the trace file naming convention wasn't consistent, so there was no way for me to delete the oldest files based only on file name.
What about the system timestamp on each file? It seemed like a good solution, but I didn't want to write a shell script to do something so minor. Then I got lucky on Google, and found this useful little gem:
Simple Page-of-Posts Solution for Wordpress

November 4, 2012 - Categories: How-to Guides,Utilities And Other Useful Things
1 minute read
Be advised This post is quite old (04 Nov 2012) and any code may be out of date. Proceed with caution.
Automate remote password changes with BASH and ‘Expect’
September 15, 2012 - Categories: Utilities And Other Useful Things
2 minute read
I think this topic has been covered, in varying levels, by many people on the internet. Still, I felt like I was bashing my head against the wall trying to figure this out. To prevent head trauma to some other sys admins, I thought I'd post this.
First, some assumptions. Let's assume you're a sysadmin, working mainly in a LAMP environment (or at least Linux and MySQL). Let's also assume you have a reasonable number of hosts, between 5 and 50. You don't really have the right scale to warrant setting up RADIUS or TACACS authentication systems, but it is a real pain in the ass to reset passwords on a regular basis. Last, let's assume that for some good reason, you use the same password across many machines, both for the OS and DB authentication. To change all of those passwords, you would have to SSH into each box, run a couple password change commands, and exit each host.