Skip to content

Instantly share code, notes, and snippets.

View tjhanley's full-sized avatar
🏒

Thomas Hanley tjhanley

🏒
View GitHub Profile
@tjhanley
tjhanley / 0_reuse_code.js
Created March 11, 2016 17:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tjhanley
tjhanley / setup.sh
Last active December 17, 2015 08:08 — forked from mrsweaters/setup.sh
#!/usr/bin/env bash
# login as root and run this script via bash & curl:
apt-get update
apt-get install -y build-essential bison openssl libreadline6 libreadline6-dev curl \
git-core zlib1g zlib1g-dev libopenssl-ruby curl libcurl4-openssl-dev libssl-dev \
libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
module BinaryTree
class Node
attr_reader :word, :count, :left, :right
include Enumerable
def initialize(word)
@word, @count = word, 1
end