50 Cent - In Da Club (Int'l Version)
ATC - All Around The World (la la la la la la la la)
Bee Gees - Stayin' Alive (1977)
Cassius - I Love You So (Original Mix) [HQ]
Crystal Waters - Gypsy Woman Full HD
Curtis Mayfield - Pusherman
Depeche Mode - Enjoy The Silence (Official Music Video)
Eiffel 65 - I'm blue with lyrics
Flight Facilities - Stand Still feat. Micky Green (Mario Basanov Remix)
Foals - Late Night (Solomun Remix)
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
// shouldTextBeDark v 1.0 | |
// (formerly colorContrast) | |
// Determines whether text color should be dark or not to | |
// contrast nicely with the background color. | |
// Based on the visual contrast algorithm suggested by the W3C | |
// (http://www.w3.org/WAI/ER/WD-AERT/#color-contrast) | |
// Call it with a RGB color: |
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
input[type="text"][role="password"] { | |
width: 200px; | |
padding: 5px 7px; | |
font-size: 14px; | |
} |
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 createWorker = function(workerFn) { | |
// Convert function to string, and get rid of the | |
// wrapping `function(){}` | |
var workerFnContents = workerFn.toString() | |
.replace(/^\s*function[^(]*\([^)]*\)\s*{/igm, '') | |
.replace(/}\s*$/, ''); | |
var blob = new Blob([workerFnContents], {type: 'application/javascript'}); | |
return new Worker(window.URL.createObjectURL(blob)); | |
}; |
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
html | |
head | |
meta( charset = 'utf-8' ) | |
link( href = 'http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic', rel = 'stylesheet', type = 'text/css') | |
body | |
#container. | |
What I would really like <u>to see on the web is beautiful typography</u> mixed in with simple, responsive content and <strong>beautiful images</strong>. |
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
/* | |
* Generate document fragment from HTML string | |
* @param { HTML string } str | |
* | |
* Example: | |
* -> document.createDocumentFragmentFromString('<b>sup</b> '); | |
* <- #document-fragment | |
*/ | |
document.createDocumentFragmentFromString = function (str) { |
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
.viewportRatio(@x, @y) { | |
width: 100vw; | |
height: @y * 100vw / @x; | |
max-width: @x / @y * 100vh; | |
max-height: 100vh; | |
} | |
.first { | |
.viewportRatio(5, 1); | |
background-color: blue; |
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
const dict = [ | |
['CM', 900], ['M', 1000], ['CD', 400], ['D', 500], | |
['XC', 90], ['C', 100], ['XL', 40], ['L', 50], | |
['IX', 9], ['X', 10], ['IV', 4], ['V', 5], | |
['I', 1], | |
] | |
function romanToInt (original) { | |
let temp = original | |
let int = 0 |
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 flatten (arr, deep) { | |
if (deep) arr = arr.map(function(e){ | |
return Object.prototype.toString.call(e) === | |
'[object Array]' ? flatten(e, true) : e; | |
}); | |
arr = Array.prototype.concat.apply([], arr || []); | |
return arr; | |
} |
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 splitResults = multisplit(str, regExp1[, regExp2[, ...[, regExpN]]]) | |
// returns single-leveled array of split results | |
var multiSplit = function (str) { | |
var regexps = [].slice.call(arguments).slice(1); | |
var parts = [str]; | |
while (regexps.length) { | |
parts = parts.map(function(part){ return part.split(regexps[0]); }); | |
parts = Array.prototype.concat.apply([], parts); |
OlderNewer