hex values of neon colors
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
function setMeatColor() { | |
var nodes = document.getElementById("messages").childNodes; | |
for (var i = 0; i < nodes.length; ++i) { | |
var node = nodes[i]; | |
var fp = node.attributes['data-fp'].value; | |
node.style.borderLeft = "6px solid #" + fp.substr(0,6); | |
} | |
setTimeout(setMeatColor, 100); | |
} | |
setMeatColor(); |
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
console.lol = function() { | |
var harray = [], harrumpf = Math.floor( Math.random() * 10 + 2 ); | |
while ( harrumpf-- ) harray.push( 'ha' ); | |
console.log( harray.join( '' ) + '!' ); | |
} |
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 Stream = require('stream'); | |
var Util = require('util'); | |
/* | |
To Use: | |
var rot13 = new ROT13Stream(); | |
streamOne.pipe(rot13).pipe(process.stdout); // takes readstream streamOne, modifies with rot13, pipes into stdout | |
*/ |
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
function (childName) { | |
var method; | |
return function fn() { | |
if (!method) { | |
for (var key in this) { | |
if (this[key] === fn) { | |
method = key; | |
break; | |
} | |
} |
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
function(fn, thisArg) { | |
var newArray = []; | |
for (var i = 0, l = this.length; i < l; i++) { | |
newArray.push(fn.call(thisArg, this[i], i, this)); | |
} | |
return newArray; | |
}; |
Web app development entails:
- interacting with data
- syncing ui and data
- responding to user interaction (dom events)
- user flow (navigating screens)
- url (de)serialization
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
/* Some boys are playing a hockey game and they each play a certain number of shifts. */ | |
/* For simplicity, we'll say there are 15 different shifts in a game. */ | |
[ | |
{ | |
"player": "Joe", | |
"shifts": [ | |
{ "shift_start": 3, "shift_end": 5 }, // Joe started playing at shift #3, and stopped after shift #5 | |
{ "shift_start": 7, "shift_end": 11 } | |
] |
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
alias wow='git status' | |
alias such='git' | |
alias very='git' | |
wow | |
such commit | |
very push |
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
/*! | |
* jQuery JavaScript Library v2.1.1pre | |
* http://jquery.com/ | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ | |
* | |
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors | |
* Released under the MIT license | |
* http://jquery.org/license |
NewerOlder