- [by. Select elements][1]
- [fragment. Turn HTML into DOMFragments][2]
- [class-list. Cross browser HTML5 classList implementation][3]
- [dom-walk. Traverse the DOM in tree order][4]
- [xhr. Minimal cross browser, cross domain XHR][5]
- [insert. Cross browser DOM4 insertion methods][6]
- [to-array. Convert nodelists into arrays][7]
- [hidden. Cross browser HTML5 hidden property][8]
// Render view helper | |
// if the request is coming from mobile and if you have a view | |
// with users.mobile.jade, then that view will be rendered | |
app.use(function (req, res, next) { | |
res._render = res.render | |
res.render = function (template, locals, cb) { | |
var ua = req.header('user-agent') | |
var fs = require('fs') |
Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
$(function() { | |
// good opportunity to combine into a single statement | |
// qq w cw <esc> A, <esc> 0 j q | |
var a = 10; | |
var b = 20; | |
var c = 30; | |
var d = 40; | |
var e = 50; | |
// opportunity to simplify syntax |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples from set theory.
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
var MARGIN = 28; | |
// Fullscreen | |
slate.bind('f:cmd,alt', function(win) { | |
// ±4 to account for hidden Dock on left of screen. | |
win.doOperation(S.op('move', { | |
'x': 'screenOriginX - 4 + ' + MARGIN, | |
'y': 'screenOriginY + ' + MARGIN, |
/* | |
* File: bst.js | |
* | |
* A pure JavaScript implementation of a binary search tree. | |
* | |
*/ | |
/* | |
* Class: BST | |
* |
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.