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 NUMBERS_TO_LETTERS = new Map([ | |
["0", "o"], | |
["1", "i"], | |
["2", "z"], | |
["3", "e"], | |
["4", "h"], | |
["5", "s"], | |
["6", "b"], | |
["7", "l"], | |
["8", "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
function LazyEventListeners(){ | |
this._listeners = {}; | |
} | |
LazyEventListeners.prototype = { | |
constructor: LazyEventListeners, | |
has: function has(propertyKey){ | |
return this._listeners.hasOwnProperty(propertyKey); | |
}, | |
_createListener: function _createListener(propertyKey, eventTarget, |
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 random | |
_DEF = object() | |
def bogo_range(start, end=_DEF, step=1): | |
if end is _DEF: | |
end = start | |
start = 0 | |
if not isinstance(start, int): | |
raise TypeError( |
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
lol gordon lol |
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
/** | |
* I need to set a fallback font for a web font. However that fallback font | |
* needs to be a web font | |
*/ | |
@font-face { | |
font-family: "FallbackFont"; | |
font-weight: bold; | |
src: url('some-place.woff'); | |
} |
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
[ | |
"Oh, cookies! I can't wait to toss them.", | |
"I've seen a lot, but nothing would ever make me cut out my tongue.", | |
"If you yield only to a conqueror, then prepared to be conquered.", | |
"Why don't they just call him Girl George?", | |
"Can you hurry up. My horse is getting tired.", | |
"You've seen those movies where they say \"Make my day.\" or \"I'm your worst nightmare.\", well listen to this one. Rubber Baby Buggy Bumpers!", | |
"What killed the dinosaurs? The Ice Age!", | |
"If you drop your gun now, I promise I won't kill you.", | |
"That's for sleeping with my wife!", |
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
class ValidatedMap { | |
clear(){ | |
this._.clear(); | |
} | |
constructor( _validationRules, _defaultValues ){ | |
let validationRules = _validationRules || null; | |
let defaultValues = _defaultValues || []; | |
this._ = new Map(); |
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
/** | |
* I can do this | |
*/ | |
function AwesomeArray(){ | |
Array.call( this ); | |
} | |
AwesomeArray.prototype = Object.create(Array.prototype); | |
var awesomeness = new AwesomeArray(); | |
awesomeness.push("example"); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<h3>Landscape correct proportions</h3> | |
<div class="image__panel"> |
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 ie = (function(){ | |
var undef, | |
v = 3, | |
div = document.createElement('div'), | |
all = div.getElementsByTagName('i'); | |
while ( | |
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->', | |
all[0] |
NewerOlder