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
/(<a[^>]*?>.*?)?(?!<[^>]*?)([a-zA-Z0-9.!\#$%&'*+\/=?^_`{|}~-])+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(?![^<]*?>)/gi |
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
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
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
# thing - {mixed}. Anything you want to get the type of. | |
getType: do => | |
unless @classToType? | |
@classToType = {} | |
for type in ['Boolean', 'Number', 'String', 'Function', 'Array', 'Date', 'RegExp', 'Undefined', 'Null'] | |
@classToType["[object #{type}]"] = type | |
return (thing) => | |
className = Object::toString.call thing | |
return if @classToType[className]? then @classToType[className].toLowerCase() else 'object' |
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 existsInAny = function(needle, propertyName, haystack){ | |
return haystack.map(function(el){return el[propertyName] === needle;}).reduce(function(a,b){return a||b;}); | |
} | |
/* | |
# CoffeeScript version | |
existsInAny = (needle, propertyName, haystack) -> | |
haystack.map((el)-> el[propertyName] is needle).reduce((a,b)-> a||b) | |
*/ |
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
find . -name \* -print0 | perl -MFile::Basename -0nle 'rename $_, dirname($_)."/prefix_".basename($_)' |
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
/* | |
* Example: productionMode.txt contains either 0 or 1 | |
*/ | |
var productionMode = true; //defaults to production, don't change this | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); |
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 path = require('path'); | |
var _invalidateRequireCacheForFile = function(filePath){ | |
delete require.cache[path.resolve(filePath)]; | |
}; | |
var requireNoCache = function(filePath){ | |
_invalidateRequireCacheForFile(filePath); | |
return require(filePath); | |
}; |
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
ie4uinit.exe -ClearIconCache |
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
.classNameOfADiv | |
span This is a span | |
| inline text next to the span which as far as I remember needs to be prepended with or be wrapped in a span |
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
document.getElementById('field').focus(); window.scrollTo(0,0); |