Skip to content

Instantly share code, notes, and snippets.

View diklein's full-sized avatar

David Klein diklein

View GitHub Profile
### Keybase proof
I hereby claim:
* I am diklein on github.
* I am diklein (https://keybase.io/diklein) on keybase.
* I have a public key ASDuxaw8fj91j45zleyXqxCzhsjC08pv6yL2gEpY8z_bdAo
To claim this, I am signing this object:
var grade = prompt("What's the grade?");
switch (grade) {
case "A": case "B": case "C": case "D":
console.log("Pass");
break;
case "F":
console.log("Fail");
break;
default:
console.log("Error");
@diklein
diklein / jsd4-madlibs.js
Created October 1, 2016 01:13
JSD4 - Homework 2
var startupX = ['Uber', 'Google', 'Amazon', 'Apple', 'Facebook', 'Twitter'];
var startupY = ['Slack', 'Trello', 'Tesla', 'Hyperloop', 'Harvest'];
var startupIdea;
var favorites = [];
var startup = document.querySelector('.startup');
var generate = document.querySelector('.generate');
var save = document.querySelector('.save');
var print = document.querySelector('.print');
var list = document.querySelector('.list');
@diklein
diklein / jsd4-2.js
Last active October 1, 2016 01:07
Javascript — Week 2
// 1. What's the max number?
var max = 0;
for (var i = 0; i < a.length; i++) {
if(a[i] > max) {
max = a[i];
}
}
console.log("max number is " + max);
@diklein
diklein / GA Final Project
Last active January 7, 2016 00:13
Ideas for my General Assembly front end web development final project
Foursquare chat:
Search for Foursquare location
Return Foursquare locations
Click button to enter chat room for that location
Enter username
Chat!
Coffee process:
Get supplies ready
Explain what we’re going to do
@diklein
diklein / gist:8125796
Last active January 1, 2016 09:38
Debut Tumblr Theme: How to show content *only* on the homepage. My goal is to place a few paragraphs of text above the blog posts on the homepage. The text will not appear on tag pages, search pages, or other index pages. Check it out on diklein.com.
<style>
.hidden { display: none; }
</style>
{block:IndexPage}
<div id="index" {block:SearchPage}class="hidden"{/block:SearchPage}>
<div class="content {block:TagPage}hidden{/block:TagPage}” role="main" id="introtext">
<article class="post post-type-text">
<div class="container">