http://james.padolsey.com/javascript/get-document-height-cross-browser/
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 (global) { | |
"use strict"; | |
function empty(obj) { | |
var key; | |
for (key in obj) if (obj.hasOwnProperty(key)) return false; | |
return true; | |
} | |
var Ember = global.Ember, |
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
// | |
// Usage: require('./pid')("myapp"); | |
// | |
var fs = require('fs'); | |
module.exports = function(appname){ | |
process.title = appname; | |
var PID_FILE = "/usr/local/var/run/"+process.title+".pid"; |
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
// Usage: | |
// var express = require('express') | |
// require('enableMultipleViewRoots')(express) | |
module.exports = function(express) { | |
var old = express.view.lookup; | |
function lookup(view, options) { | |
// If root is an array of paths, let's try each path until we find the view | |
if (options.root instanceof Array) { |
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 webdriverjs = require('../index'), | |
client = webdriverjs.remote({ | |
desiredCapabilities: { | |
browserName: 'chrome', | |
version: '27', | |
platform: 'XP', | |
tags: ['examples'], | |
name: 'This is an example test' | |
}, | |
host: 'ondemand.saucelabs.com', |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
A curated list by Eric Elliott and friends. Suggest links in the gist comments.
Help us turn this into a proper website!
This is a very exclusive collection of only must-have JavaScript links. I'm only listing my favorite links. Nothing else makes the cut. Feel free to suggest links if you think they're good enough to make this list. The really curious should feel free to browse the comments to find other links. I can't guarantee the quality of links in the comments.
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
{ | |
"ecmaFeatures": { | |
"arrowFunctions": true, | |
"binaryLiterals": false, | |
"blockBindings": true, | |
"classes": true, | |
"defaultParams": true, | |
"destructuring": true, | |
"forOf": false, | |
"generators": true, |
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
javascript: (function () { | |
var el = document.createElement('pre'), | |
b = document.getElementsByTagName('body')[0], | |
otherjQuery = false, | |
msg = '', | |
libs = [ | |
function loadjQuery() { | |
if (typeof jQuery != 'undefined') { | |
showMsg('This page already using jQuery v' + jQuery.fn.jquery); | |
} else { |
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 just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
OlderNewer