Skip to content

Instantly share code, notes, and snippets.

Avatar

James jayrobin

View GitHub Profile
@jayrobin
jayrobin / gmaps.js
Created Sep 11, 2014
Disabling features on a map
View gmaps.js
map = new google.maps.Map(document.getElementById("google_map"), mapOptions);
var styles = [
{
featureType: "poi",
stylers: [
{ visibility: "off" }
]
}
];
@jayrobin
jayrobin / queue.rb
Last active Aug 29, 2015
Ruby implementation of queue
View queue.rb
class Queue
def initialize(max_size=nil)
@max_size ||= Float::INFINITY
@store = []
end
def enqueue(item)
raise "The queue is full" if self.full?
@store << item
end
View week 8 and 9.md
View week8.md

Week 8

  • Fetch Changes
  • Peer Pair 1
  • Peer Pair 1 Feedback
  • Peer Pair 2
  • Peer Pair 2 Feedback
  • Meta Feedback 7+ Times
  • Submit Work

Challenge 1. HTML-CSS

View week7.md
View week6.md
View week5.md

Week 5: Ruby Classes

  • Fetch Changes
  • Peer Pair 1
  • Peer Pair 1 Feedback
  • Peer Pair 2
  • Peer Pair 2 Feedback
  • Meta Feedback 7+ Times
  • Submit Work
@jayrobin
jayrobin / Numbers to english words
Last active Aug 29, 2015
Prompts for a number and outputs the same number in English
View Numbers to english words
# convert a triplet (0-999) into english words representing the value
def triplet_to_words(triplet)
ones = ["", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
teens = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"]
tens = ["", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"]
left_digit = triplet / 100
middle_digit = (triplet % 100) / 10
right_digit = triplet % 10
View objectives.md

#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
@jayrobin
jayrobin / Sorting Algorithms
Last active Aug 29, 2015
A selection of basic sorting algorithms in Ruby
View Sorting Algorithms
module SortAlgorithms
def self.benchmark(iterations, method, array)
start_time = Time.now
iterations.times { |i| method.call(array.clone) }
Time.now - start_time
end
def self.bubble_sort(array)
array.each do |elem|
(array.size - 1).times do |i|
You can’t perform that action at this time.