Skip to content

Instantly share code, notes, and snippets.


Stewart Henderson bowlofstew

View GitHub Profile
bowlofstew / The Technical Interview Cheat
Last active Aug 26, 2015 — forked from tsiege/The Technical Interview Cheat
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
View build.gradle
* The plugins used for this build.
* Provides the compile, test, jar, etc tasks
apply plugin: 'java'
* Generates the Eclipse project files.
bowlofstew / gist:011fb2283ebe4a622b3c
Last active Aug 29, 2015
General environment setup for Java7/8, SBT, Kafka, Akka, and Scala
View gist:011fb2283ebe4a622b3c
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
#This is fine for Zookeeper or Kafka
sudo apt-get install oracle-java7-installer
#We require this on our other servers
#sudo apt-get install oracle-java8-installer
View redis_setup
#Mount EBS volume
#Check drives
sudo mkdir /data
sudo mount {device_name} /data
# Install Redis
apt-get update
apt-get upgrade
apt-get install redis-server
bowlofstew / amazon_api_install
Created Jun 13, 2014
Installation information for Python Amazon API information.
View amazon_api_install
sudo apt-get install python-pip
sudo apt-get install git
sudo apt-get install python-lxml
sudo pip install python-dateutil
sudo pip install redis
sudo pip install git+
from pyparsing import *
# By default, PyParsing treats \n as whitespace and ignores it
# In our grammer, \n is significant, so tell PyParsing not to ignore it
ParserElement.setDefaultWhitespaceChars(" \t")
def parse(input_string):
def convert_prop_to_dict(tokens):
"""Convert a list of field property tokens to a dict"""
prop_dict = {}

Keybase proof

I hereby claim:

  • I am bowlofstew on github.
  • I am stewart ( on keybase.
  • I have a public key whose fingerprint is 156C 390E C672 CEF9 FDFE 3C71 843E 4EE7 7C5A EE67

To claim this, I am signing this object:

View state_monad.cpp
#include <utility>
#include <iostream>
struct void_
template<typename Stream>
friend Stream &operator<<(Stream &s, void_)
return s << "()";

If you don't care about the explanation, scroll down to find the code, it's 50 some odd lines and written by someone who doesn't know any better. You have been warned.

What it does

This is a very simple proof of concept jitting RPN calculator implemented in python. Basically, it takes the source code, tokenizes it via whitespace, and asks itself one simple question: am I looking at a number or not?

First, let's talk about the underlying program flow. Pretend that you are a shoe connoisseur with a tiny desk. You may only have two individual shoes on that desk at any one time, but should you ever purchase a new one or get harassed by an unruly shoe salesman without realizing that you have the power to say no (or even maybe?), you can always sweep aside one of the two shoes on the desk (the one on the right, because you're a lefty and you feel that the left side is always superior) onto the messy floor, put the other shoe on the right hand side, and then place your newly acquired shoe in

View echo.cxx
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <ev++.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <resolv.h>
#include <errno.h>
#include <list>