A Pen by Jared Anderson on CodePen.
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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0.rc.1) | |
// ---- | |
.test{ | |
color: darken(#066f93, 5%); | |
color: darken(#066f93, 10%); | |
color: darken(#066f93, 20%); | |
color: darken(#066f93, 30%); |
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
Show hidden characters
{ | |
"blacklist": [ | |
"es3.memberExpressionLiterals", | |
"es3.propertyLiterals", | |
"es5.properties.mutators", | |
"es6.blockScoping", | |
"es6.classes", | |
"es6.constants", | |
"es6.arrowFunctions", | |
"es6.spec.symbols", |
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 delay(time, callback) { | |
setTimeout( ()=>callback(`Slept for ${time}`), time); | |
} | |
function run(generatorFunction) { | |
var iterator = generatorFunction(resume); | |
function resume(callbackValue) { |
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* spinner() { | |
while( true ) { | |
yield '\\'; | |
yield '|'; | |
yield '/' | |
yield '-'; | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="import" href="./my-tabs.html"> | |
</head> | |
<body> | |
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
--log_gc (Log heap samples on garbage collection for the hp2ps tool.) | |
type: bool default: false | |
--expose_gc (expose gc extension) | |
type: bool default: false | |
--max_new_space_size (max size of the new generation (in kBytes)) | |
type: int default: 0 | |
--max_old_space_size (max size of the old generation (in Mbytes)) | |
type: int default: 0 | |
--max_executable_size (max size of executable memory (in Mbytes)) | |
type: int default: 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
export default form => { | |
let determineValue = elm => { | |
switch (elm.type) { | |
case "file": | |
return elm.files; | |
case "checkbox": |
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
export default ( chunkLength = 20 , sourceArray = [] ) => ( | |
sourceArray.reduce( (accumulated, current, index) => { | |
let chunkN = Math.floor( index/chunkLength ); | |
accumulated[ chunkN ] = ( accumulated[ chunkN ]||[]).concat( current ); | |
return accumulated; | |
}, []) | |
); |
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
export function dedupeByMatchingObjectsValues( keys , arrayOfObjects ) { | |
return arrayOfObjects.filter( (item, i, inArray) => ( | |
inArray.find( target => ( | |
[].concat(keys).reduce( (bool, key) => bool && item[ key ]===target[ key ], true) | |
))===item | |
)); | |
} |
OlderNewer