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
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { | |
"use strict"; | |
if (this == null) { | |
throw new TypeError(); | |
} | |
var t = Object(this); | |
var len = t.length >>> 0; | |
if (len === 0) { | |
return -1; |
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() { | |
// Used to resolve the internal `[[Class]]` of values | |
var toString = Object.prototype.toString; | |
// Used to resolve the decompiled source of functions | |
var fnToString = Function.prototype.toString; | |
// Used to detect host constructors (Safari > 4; really typed array specific) | |
var reHostCtor = /^\[object .+?Constructor\]$/; |
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
//Using jquery | |
[].forEach.call(document.querySelectorAll("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)}) | |
//Full CSS Layout Debugger Tool | |
http://pesticide.io/ |
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 (root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(['b'], factory); //AMD | |
} else if (typeof exports === 'object') { | |
module.exports = factory; //CommonJS | |
} else { | |
root.amdWeb = factory(root.b); //Global | |
} | |
}(this, function (b) { | |
return {}; //Module |
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
String.prototype.format = function() { | |
var args = arguments; | |
return this.replace(/{(\d+)}/g, function(match, number) { | |
return typeof args[number] != 'undefined' ? args[number] : match; | |
}); | |
}; |
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
npm install gulp -g && npm install --save-dev gulp-connect |
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 commands: type in console server -f/-g | |
var units = process.argv[2]; | |
if(units == '-f'){ | |
this.setUnits('Fahrenheit'); | |
} else { | |
this.setUnits('Celsius'); | |
} | |
//Flag and Argument Pairs: type in console node -c Tampa,FL |
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 Patterns = { | |
INT: /[0-9 -()+]+$/, | |
FLOAT: /[-+]?([0-9]*.[0-9]+|[0-9]+)/, | |
EMAIL: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$/, | |
IP: /bd{1,3}.d{1,3}.d{1,3}.d{1,3}b/, | |
CREDIT_CARD: /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35d{3})d{11})$/, | |
USER_NAME: /^[a-z0-9_-]{3,16}$/, | |
PASSWORD: /^[a-z0-9_-]{6,18}$/, | |
PASSWORD_STRENGTH: /((?=.*d)(?=.*[a-z])(?=.*[A-Z]).{8,15})/gm, |
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
Show hidden characters
{ | |
"maxerr" : 50, // {int} Maximum error before stopping | |
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
"camelcase" : true, // true: Identifiers must be in camelCase | |
"curly" : false, // true: Require {} for every new block or scope | |
"eqeqeq" : true, // true: Require triple equals (===) for comparison | |
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty() | |
"freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. | |
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` |
This file has been truncated, but you can view the full file.
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 python | |
# | |
# Hi There! | |
# You may be wondering what this giant blob of binary data here is, you might | |
# even be worried that we're up to something nefarious (good for you for being | |
# paranoid!). This is a base64 encoding of a zip file, this zip file contains | |
# an entire copy of pip. | |
# | |
# Pip is a thing that installs packages, pip itself is a package that someone | |
# might want to install, especially if they're looking to run this get-pip.py |
OlderNewer