This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This class defines a calendar factory. | |
Pass a dom node as an argument for the draw() method, to insert a | |
calendar as a child of the passed node (this replaces the node's contents). | |
Constructor parameters are month, year, and optional day data. | |
Valid JSON data is constructed as key-pairs of "mm/dd/yyyy: value" | |
EXAMPLE: | |
{ ... | |
mm/dd/yyyy: value, | |
mm/dd/yyyy: value, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a modal class that creates a js object containing: | |
- a parent div, to use for things like dimming the page behind the dialog | |
- a title H1 containing whatever is passed as the title argument | |
- a body div containing whatever is passed as the body argument | |
A callback function will fire when the html is ready, if passed as a third argument. | |
Built-in methods: | |
- destroy() removes the dialog from the dom; takes no arguments | |
- attach() injects html model into the document; accepts a target node as argument; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Prompt = function(prompt){ | |
var box = document.createElement('textarea'); | |
box.placeholder = prompt; | |
box.style.width = "30vw"; | |
box.style.height = "60vh"; | |
box.style.marginTop = "20vh"; | |
box.style.marginLeft = "35vw"; | |
box.style.position = "fixed"; | |
box.style.left = "0"; | |
box.style.top = "0"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getBeginningDate = function(period, date){ | |
var date = (date === undefined ? new Date() : new Date(date)); | |
if (period) { | |
period = period.toLowerCase(); | |
switch (period) { | |
case 'year': | |
date.setMonth(0); | |
case 'quarter': | |
if (date.getMonth() >= 9) { | |
date.setMonth(9); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
//set 1 | |
"witnesses": "thse dudes I don't know", | |
"allegedly": "kinda probably", | |
"new study": "tumblr post", | |
"rebuild": "avenge", | |
"space": "spaaaace", | |
"google glass": "virtual boy", | |
"smartphone": "pokedex", | |
"electric": "atomic", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var h = 0;setInterval(function(){document.querySelectorAll('.clearfix._nd_.direction_ltr.text_align_ltr .clearfix div').forEach(function(e,i,a){ | |
e.style.backgroundColor = "hsl("+h+", 83%, 44%)" | |
}) | |
if (h < 359) | |
h++ | |
else | |
h = 0 | |
}, 100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>Chessclock</title> | |
<link href='https://fonts.googleapis.com/css?family=Nixie+One' rel='stylesheet' type='text/css'> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/mithril/0.2.5/mithril.min.js"></script> | |
<style> | |
* { | |
font-family: 'Nixie One', sans-serif; | |
color: #E41B21; | |
} | |
body, html { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Austin: "Is Andrew's brother-in-law not getting hired then? Oh wait, no, it was his wife's brother, wasn't it? Oh wait... That's the same thing..." | |
Jameson: "Are we going to finish by the end of the day?" (In regards to a ~30 minute task, with 2 hours left in the day) | |
Jordan: "At the rate I'm going... No." | |
Matt: "Its time to decompose Kurt. Kurt, just lay down in the dirt for like, a long time." | |
Austin: "It looks great guys!" | |
Jordan: "...it looks awful..." | |
Austin: "Well, yeah, but" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
.modal-container { | |
background: rgba(0,0,0,0.5); | |
display: block; | |
height: 100vh; | |
position: absolute; | |
left: 0; | |
top: 0; |
OlderNewer