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
$('someform').submit(function() { | |
var form = $(this); | |
var out = {}; | |
form.find('input').each(function() { | |
var input = $(this); | |
var name = input.attr('name'); | |
var val = input.val(); | |
out[name] = val; | |
}); |
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
$('someform').submit(function() { | |
var form = $(this); | |
var out = {}; | |
form.find('input').each(function() { | |
var input = $(this); | |
var name = input.attr('name'); | |
var val = input.val(); | |
out[name] = val; | |
}); |
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
asdf |
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
/** | |
* Simple proxy server to get around cross domain issues | |
*/ | |
var express = require('express'); | |
var app = module.exports = express(); | |
var request = require('request') | |
/** | |
* CORS |
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
## Start an HTTP server from a directory, optionally specifying the port | |
function server() { | |
local port="${1:-8000}" | |
open "http://localhost:${port}/" && python -m SimpleHTTPServer "$port" | |
} | |
## Display as a list, sorting by time modified | |
alias ll='ls -1t' | |
## Display the insides of a particular directory |
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
.blue { | |
height: 200px; | |
width: 100%; | |
background: #293e81; | |
} | |
.white { | |
height: 200px; | |
width: 100%; | |
background: #F7F7F7 |
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
/** | |
* Transform | |
* | |
* @param {Number} left | |
* @param {Number} scale | |
* @param {Number} top | |
* @return {Zoom} | |
* @api private | |
*/ |
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
{ 'exiftool version number': '9.37', | |
'file name': 'screenshot.png', | |
directory: '.', | |
'file size': '63 kB', | |
'file modification date time': '2013:10:12 13:47:47-07:00', | |
'file access date time': '2013:10:12 13:52:47-07:00', | |
'file inode change date time': '2013:10:12 13:47:47-07:00', | |
'file permissions': 'rw-r--r--', | |
'file type': 'PNG', | |
'mime type': 'image/png', |
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
/** | |
* Module Dependencies | |
*/ | |
var array = require('array'); | |
var modella = require('modella'); | |
var User = modella('user') | |
.attr('name', { type: String }) | |
.attr('age', { type: Number }) |
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
const UP = 1; | |
const LEFT = 2; | |
const UL = 4; | |
function nw(s1, s2, op) { | |
op = op || {}; | |
const G = op.G || 2; | |
const P = op.P || 1; | |
const M = op.M || -1; | |
var mat = {}; |