Web app development entails:
- interacting with data
- syncing ui and data
- responding to user interaction (dom events)
- user flow (navigating screens)
- url (de)serialization
| /*! | |
| * 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 |
| alias wow='git status' | |
| alias such='git' | |
| alias very='git' | |
| wow | |
| such commit | |
| very push |
| /* 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 } | |
| ] |
Web app development entails:
| 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; | |
| }; |
| function (childName) { | |
| var method; | |
| return function fn() { | |
| if (!method) { | |
| for (var key in this) { | |
| if (this[key] === fn) { | |
| method = key; | |
| break; | |
| } | |
| } |
| 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 | |
| */ |
| console.lol = function() { | |
| var harray = [], harrumpf = Math.floor( Math.random() * 10 + 2 ); | |
| while ( harrumpf-- ) harray.push( 'ha' ); | |
| console.log( harray.join( '' ) + '!' ); | |
| } |
| 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(); |