Skip to content

Instantly share code, notes, and snippets.

@andrewjadams3
andrewjadams3 / linked_list.rb
Created September 23, 2014 19:32
Basic implementation of a linked list in Ruby
class LinkedList
def initialize(head=nil)
@head = head
end
def size
if @head.nil?
0
else
@head.size
@andrewjadams3
andrewjadams3 / peano.rb
Last active August 29, 2015 14:03
Simple implementation of Peano numbers in Ruby
# Simple implementation of Peano numbers in Ruby
# Currently supports addition and subtraction
# Read more about Peano numbers here:
# http://mathworld.wolfram.com/PeanosAxioms.html
class Zero
def +(peano)
peano.zero? ? self : peano
end
@andrewjadams3
andrewjadams3 / post-commit
Created June 25, 2014 03:20
Salamanders post-commit hook
#!/usr/bin/env ruby
# This hook will be executed after every successful commit.
# To use this hook:
#
# 1: Enable git templates (if not already enabled)
# git config --global init.templatedir '~/.git-templates'
#
# 2: Create global hook directory
@andrewjadams3
andrewjadams3 / objectives.md
Last active October 26, 2016 21:52
DBC Prep Objectives

#DBC Prep Objectives

For any technical support, please feel free to scope out and post in the Dev Bootcamp Help Facebook group.


1. Personal Preparation

Keep track of the your explanations and results below. You will be asked to submit your responses prior to entering Phase 0.

Learning Objectives: