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
// Open most Sporcle quizzes, launch the web inspector, and paste and execute this in the console to reveal all of the answers | |
answers.map(encodedAnswer => { | |
let decodedAnswer = ''; | |
for (encodedLetter of encodedAnswer) { | |
const decodedLetter = Object.keys(asta).find(key => asta[key] === encodedLetter); | |
decodedAnswer += decodedLetter == null ? ' ' : decodedLetter; | |
} | |
return decodedAnswer; | |
}); |
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
/* | |
* Disclaimer: I neither endorse nor necessarily support these techniques. In general, I value readability over brevity, but I found | |
* some of these to be somewhat interesting and worth noting and sharing, as I have seen them used extensively. | |
*/ | |
/* Convert any value to a Boolean */ | |
var myVal = null; | |
!!myVal; // false |
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
# Excludes master, by default; other branches can be added with an additional pipe i.e. | grep -v dev | |
# Update "[branch_to_check_against]" to be the branch where the to-be-pruned branches have been merged into (by default, this is master) | |
# Adapted from http://stackoverflow.com/a/18143078/1569595 | |
git pull && git branch --merged [branch_to_check_against] | grep -v "\*" | grep -v master | grep -v [branch_to_check_against] | xargs -n 1 git branch -d |
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
/* | |
This assumes that the mixin is being included inside a selector. | |
Particularly useful for a set of selectors that have vendor-specific | |
prefixes, which cannot be mixed in a selector group. | |
Example usage: | |
@selectors: bar, baz, ~'::-webkit-input-placeholder', ~'::-moz-placeholder';; | |
.foo { | |
.explode-rule({ | |
width: 100%; |
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
enyo.kind({ | |
name: 'GoogleMap', | |
kind: 'Control', | |
published: { | |
zoom: 16, | |
center: null, | |
mapTypeId: 0, | |
useDefaultUI: true, | |
debugMode: false | |
}, |