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 f() { | |
console.log('with local arguments'); | |
console.log(f.arguments === arguments); | |
console.log(f.arguments === f.arguments); | |
} | |
function f2() { | |
console.log('without local arguments'); | |
console.log(f2.arguments === f2.arguments); | |
} |
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
node-browserify [master] $ npm test | |
> browserify@2.35.4 test /Users/spenceralger/dev/node-browserify | |
> tap test/*.js | |
ok test/args.js ......................................... 2/2 | |
ok test/backbone.js ..................................... 4/4 | |
ok test/bin.js .......................................... 4/4 | |
ok test/bin_entry.js .................................... 4/4 | |
ok test/buffer.js ..................................... 14/14 |
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
bulk (POST/PUT) [POST] -> http://elasticsearch.org/guide/reference/api/bulk/ | |
count (POST/GET) [POST] -> http://elasticsearch.org/guide/reference/api/count/ | |
create (POST/PUT) [POST] -> http://elasticsearch.org/guide/reference/api/index_/ | |
explain (GET/POST) [POST] -> http://elasticsearch.org/guide/reference/api/explain/ | |
index (POST/PUT) [POST] -> http://elasticsearch.org/guide/reference/api/index_/ | |
indices.analyze (GET/POST) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze/ | |
indices.clearCache (POST/GET) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-clearcache/ | |
indices.create (PUT/POST) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index/ | |
indices.flush (POST/GET) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-flush/ | |
indices.optimize (POST/GET) [POST] -> http://www.elasti |
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(){ | |
var barColor = '#333'; | |
var defaultHeight = 150; | |
var defaultWidth = 400; | |
window.console.graph = function (points, height, width) { | |
var height = height || defaultHeight; | |
var width = width || Math.max(defaultWidth, points.length); | |
var barWidth = Math.floor(width / points.length); | |
var maxPoint = Math.max.apply(Math, points); |
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
#!/usr/bin/env bash | |
# call this with the pr number you want to apply and the base branch of that pr | |
# | |
# backport pr 5805, which was submitted against master, to 4.4: | |
# git co 4.4 | |
# git cherry-pick-pr 5805 | |
# | |
# backport pr 5840, which was submitted against 4.x, to 4.4: | |
# git co 4.4 |
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
import gulp from 'gulp' | |
import babel from 'gulp-babel' | |
import combiner from 'stream-combiner2' | |
import sourcemaps from 'gulp-sourcemaps' | |
import watch from 'gulp-watch' | |
import gulpif from 'gulp-if' | |
import del from 'del' | |
import vinylPaths from 'vinyl-paths' | |
gulp.task('default', function () { |
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
/* | |
* SystemJS v0.19.17 | |
*/ | |
!function(){function e(){!function(e){function t(e,t){var n;return e instanceof Error?(n=new Error(e.message,e.fileName,e.lineNumber),M?(n.message=e.message+"\n "+t,n.stack=e.stack):(n.message=e.message,n.stack=e.stack+"\n "+t)):n=e+"\n "+t,n}function n(e,n,r){try{new Function(e).call(r)}catch(a){throw t(a,"Evaluating "+n)}}function r(){}function a(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},z(this,"global",{get:function(){return e}})}function o(){a.call(this),this.paths={}}function s(e,t){var n,r="",a=0;for(var o in e){var s=o.split("*");if(s.length>2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(t==o)return e[o];if(t.substr(0,o.length-1)==o.substr(0,o.length-1)&&(t.length<o.length||t[o.length-1]==o[o.length-1])&&"/"==e[o][e[o].length-1])return e[o].substr(0,e[o].length-1)+(t.length>o.length?"/"+t.substr(o.length):"")}else{var i=s[0].length;i>=a&&t.substr(0,s[0].length)==s[0]&&t.substr(t.length-s[1].l |
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 partial = (function () { | |
'use strict'; | |
const caches = new WeakMap() | |
return function partial(fn, ...args) { | |
let toApply = fn | |
while (args.length) { | |
if (!caches.has(toApply)) caches.set(toApply, []) |
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 checkForConnection() { | |
esClient.ping(function (err, pong) { | |
if (pong) { | |
console.log("Ping got pong!"); | |
} else { | |
console.log("Ping did not get pong, trying again in 3sec."); | |
setTimeout(checkForConnection, 3000); | |
} | |
}) | |
}()); |
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 get = require('lodash.get') | |
const vars = { first: 'spencer', last: 'alger', age: 28 } | |
return 'Mr. { first } {last }, age {age}'.replace(/\{\s*(.+?)\s*\}/g, (_, name) => get(vars, name)) |