Skip to content

Instantly share code, notes, and snippets.

View ZacharyDinerstein's full-sized avatar

Zachary Dinerstein ZacharyDinerstein

View GitHub Profile
@ZacharyDinerstein
ZacharyDinerstein / gist:fd5aa71f0e97bfcad9c3
Created September 3, 2014 22:46
Israel About Me Page - index.html
<!DOCTYPE html>
<html>
<head>
<title>Hi!, I&#8217;m israel Ochoa</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link href='http://fonts.googleapis.com/css?family=Lato:400,900' rel='stylesheet' type='text/css'>
</head>
@ZacharyDinerstein
ZacharyDinerstein / gist:e9b2dc22667a6330e093
Last active August 29, 2015 14:06
HTML Template Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>About Me</title>
<link rel="stylesheet" type="type/css" href="css/main.css" />
</head>
<body>
@ZacharyDinerstein
ZacharyDinerstein / _check_all_that_apply_quiz.hbs
Created August 27, 2014 15:52
Quiz App Code - Glamour Magazine
<div class="check-all-that-apply-quiz">
{{> _contributor}}
<p class="quiz-instructions">{{{data.main.body.text}}}</p>
<div class="selection-section">
{{#each data.main.quizData.selections}}
{{#if imageUrl}}
@ZacharyDinerstein
ZacharyDinerstein / index.html
Created February 21, 2014 00:59
d3 Earthquake App
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="http://datamaps.github.io/scripts/datamaps.all.min.js"></script>
<title>Earthquake!</title>
</head>
<body>
// ** Models **
var Monkey = Backbone.Model.extend({
defaults: {
joy: 0,
bananas: 5
},
eatBanana: function(){
this.attributes.joy += 1;
this.attributes.bananas -= 1;
//========================================PART 2 (BONUS)===========================================
//=======================================Favorite Things===================================
var my_array = ["Talking Heads", "Sonic Youth", "Television", "Tom Waits", "The Woes", "They Might Be Giants", "Sleater-Kinney", "Wilco", "Stereolab", "The Woes", "Reggie Watts", "Radiohead", "Bjork", "Ted Leo", "Bob Dylan"];
var num = 1; //Set 'num' to 1. Will Allow us to count..
//..our first favorite band below.
@ZacharyDinerstein
ZacharyDinerstein / app.rb
Last active December 31, 2015 09:19
Music Brainzzzz app.rb
require 'bundler/setup'
Bundler.require(:default)
require 'musicbrainz'
require 'lastfm'
MusicBrainz.configure do |c|
# Application identity (required)
c.app_name = "BRAINZZZZ"
c.app_version = "1.0"
@ZacharyDinerstein
ZacharyDinerstein / classes.rb
Last active December 30, 2015 18:09
happyTails_app.rb Currently debugging...
def menu
@happiTails = Shelter.new
puts "Do you want to: "
puts "Show all animals (sa)"
puts "Show all clients (sc)"
puts "Create an animal (ca)"
puts "Create a client (cc)"
puts "Help a client adopt an animal (a)"
puts "Help a client put an animal up for adoption (p)? "
@ZacharyDinerstein
ZacharyDinerstein / gist:7832292
Created December 6, 2013 21:21
Michael Shfaer's Death Racer Robot Program ... (a good example of filling Classes with modules)
module Wheeled
def wheeled?
true
end
def roll
puts "Yeah, buddy"
end
end
module Wooden
@ZacharyDinerstein
ZacharyDinerstein / gist:7799984
Created December 5, 2013 04:16
nyc subway threelines app
@l_line = {:"8th Ave" => 1, :"6th" => 2, :"Union Square" => 3, :"3rd" => 4, :"1st" => 5} #DO I NEED TO MAKE THE SYMBOLS STRINGS?
@n_line = {:"8th St" => 1,:"Union Square" => 2, :"23rd N" => 3, :"28th N" => 4, :"34th" => 5, :"Times Square" => 6}
@six_line = {:"Astor Place" => 1, :"Union Square" => 2, :"23rd 6" => 3, :"28th 6" => 4, :"33rd" => 5, :"Grand Central" => 6}
def location
puts "Which stop are you at now?"
@here = gets.chomp.to_sym
train1 #Calls train1
end