const globals = require('can-globals');
// Set the global key's default value to the window object
globals.initialize('global', window);
This file contains hidden or 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 fs = require('fs'); | |
var path = require('path'); | |
module.exports = { | |
getOptions: function () { | |
return []; | |
}, | |
run: function (directory, opts) { | |
var promises = []; |
This file contains hidden or 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 fs = require('fs'); | |
var path = require('path'); | |
var MODULE_DESC_REGEX = /<code>__can-.+__ <\/code>\n(.+)/m; | |
var FALLBACK_MODULE_DESC_REGEX = /(?=\n[a-z]|\n[A-Z])\n(.+)/m | |
module.exports = { | |
getOptions: function () { | |
return []; | |
}, | |
This file contains hidden or 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(win, d, obj) { | |
/** | |
* @param {string} obj | |
* @param {string} type | |
* @return {?} | |
*/ | |
function is(obj, type) { | |
return typeof obj === type; | |
} | |
/** |
First off lets start with some simples rules.
- Don't commit directly to master, only merge to master.
- Only merge to master if the source branch is stable.
- Never fucking force push (
-f
or--force
) to fucking anything ever. - Don't use
rm
or your file manager to delete files. Usegit rm
instead. - Linus Torvalds is the Supreme Leader. All hail the Supreme Leader!
This file contains hidden or 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
'use strict'; | |
const Request = require('request'); | |
const Cheerio = require('cheerio'); | |
const fs = require('fs'); | |
const STORE_URL = 'https://www.site-domain.com/'; | |
const req = Request.defaults({jar: true}); | |
require('request-debug')(Request); | |
req.post({ | |
url: `${STORE_URL}account/login`, |
This file contains hidden or 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
class Pages extends Array{ | |
constructor(){ | |
super().push.apply(this, arguments); | |
this.i = 0; | |
} | |
get next(){ | |
return this[this.i++]; | |
} | |
} | |
var p = new Pages(1,2,3,4,5,6,7,8,9,10); |
This file contains hidden or 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 argv = require('yargs').argv; | |
var chmod = require("gulp-chmod"); | |
var debug = require('gulp-debug'); | |
var fs = require('fs'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var istanbul = require('gulp-istanbul'); | |
var jshint = require('gulp-jshint'); | |
var mocha = require('gulp-mocha'); | |
var path = require('path'); |
This file contains hidden or 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 mongoURL(options) { | |
options = options || {}; | |
var URL = 'mongodb://'; | |
if (options.password && options.username) URL += options.username + ':' + options.password + '@'; | |
URL += (options.host || 'localhost') + ':'; | |
URL += (options.port || '27017') + '/'; | |
URL += (options.database || 'admin'); | |
return URL; | |
} |
NewerOlder