Skip to content

Instantly share code, notes, and snippets.


Eric Saxman Andrelton

View GitHub Profile
Andrelton / minimum.html
Created Dec 20, 2015
Bare-minimum HTML page with jquery and stylesheet/script tags.
View minimum.html
<!DOCTYPE html>
<html lang="en">
<title>Minimum html page.</title>
<meta charset="utf-8">
<link rel="stylesheet" href="index.css">
<script src=""></script>
Andrelton / huffman.rb
Created Dec 5, 2015
Huffman Encoding Ruby Implementation
View huffman.rb
class Node
attr_reader :value, :left, :right
def initialize(value, left, right)
@value, @left, @right = value, left, right
class CountObject
attr_reader :char, :value
Andrelton / hello_rack_app.rb
Created Nov 10, 2015
Simple Rack app as a Ruby file instead of
View hello_rack_app.rb
# Start server from command line with 'rackup hello_rack_app.rb'
# Make a GET request to the localhost port with cURL or your browser
require 'rack'
class Hello
{ 'Content-type' => 'text/html' },
View CSV Notes
require 'csv'
friends = []"hamburgler.txt", 'r') do |f|
f.each_line { |line| friends << line.chomp }
p friends"helicopter.txt", 'w') do |f|
friends.each do |item|
View Recursive Boggle
def checker(board, word, last_idx = nil)
return true if word.empty?
#take letter from front of word
letter = word.slice!(0)
this_idx = []
# change last letter to "NO"
if last_idx
board[last_idx[:row]][last_idx[:column]] = "NO"
You can’t perform that action at this time.