Skip to content

Instantly share code, notes, and snippets.

View jongrover's full-sized avatar

Jonathan Grover jongrover

View GitHub Profile
@jongrover
jongrover / nyc-pidgeon-organizer.rb
Last active December 24, 2015 11:58
NYC Pigeon Hash Organizer Lab
########################
# NYC PIGEON ORGANIZER #
########################
# Start with the following collected data on NYC pigeons.
pigeon_data = {
:color => {
:purple => ["Theo", "Peter Jr.", "Lucky"],
:grey => ["Theo", "Peter Jr.", "Ms .K"],
@jongrover
jongrover / kiosk-pi.txt
Last active December 3, 2023 21:45
How to Kiosk Raspberry Pi
Software for the Project:
Raspbian Wheezy Debian Linux
Win32Disk Imager
The CanaKit comes with a pre-loaded SD card that includes the same version of Debian Wheezy that I used for this project. However, in an effort to get a little more speed out of the system, I used the 95MB/s Sandisk extreme listed above. It seemed to help, but I did not bench mark it beyond observation.
Anyway, lets get down to building a Raspberry Pi Web Kiosk.
Step 0: Get all of the hardware.
Step 1: Get all of the software.
@jongrover
jongrover / anagram.rb
Created October 7, 2013 14:32
Anagram todo solution
class Anagram
attr_accessor :word
def initialize(word)
@word = word
end
def match(compare_words)
# ['ab', 'abc', 'bac']
# return array with ant matches
@jongrover
jongrover / dog.rb
Last active December 24, 2015 22:19
Basic example code for ruby Object Oriented Programming.
class Dog
attr_accessor :name, :age # this code for :name creates the reader writer methods for name below
# def name=(name)
# @name = name
# end
# def name
# @name
# end
@jongrover
jongrover / fart.html.erb
Last active December 28, 2015 11:09
Simple example for button that posts an AJAX request to a Rails Backend.
<button id="fart_button">Pull my finger!</button>
/**
* Learn HTML & CSS from Scratch
* 4.1: Responsive Layouts
*/
/********** Device Styles **********/
/**
* Tablet Landscape: 1024px
*/
@jongrover
jongrover / 99-bottles.rb
Created December 11, 2013 20:44
99 bottles of water example script
# wall has bottles.
# wall can count number of bottles it has.
# subtract a bottle.
# sing song line by line subtracting bottle each time and loop.
# when complete start from beginning.
class Wall
attr_accessor :bottles
def initialize
@jongrover
jongrover / index.html
Created January 7, 2014 19:11
Sonja WIP Socrata Challenge
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Socrata Technical Challenge</title>
<style>
p {
color: black;
margin: 10px;
font-size: 16px;
@jongrover
jongrover / index.html
Created January 14, 2014 19:31
Responsive Site Technique Example Code
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Werd</title>
<style>
body {
font-size: 100%; /* 16 px (1em) */
}
h1 {
@jongrover
jongrover / .bash_profile
Last active August 29, 2015 13:56
FIS Bash Profile for Front-end Web Development (minus Homebrew and RVM paths)
# Configuring Our Prompt
# ======================
# if you install git via homebrew, or install the bash autocompletion via homebrew, you get __git_ps1 which you can use in the PS1
# to display the git branch. it's supposedly a bit faster and cleaner than manually parsing through sed. i dont' know if you care
# enough to change it
# This function is called in your prompt to output your active git branch.
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'