Skip to content

Instantly share code, notes, and snippets.

View espadrine's full-sized avatar

Thaddée Tyl espadrine

View GitHub Profile
@espadrine
espadrine / color-cheat-golf.js
Last active January 3, 2016 19:09 — forked from jankeromnes/color-cheat-golf.js
Cheat on <http://www.colormunki.com/game/huetest_kiosk>. How to get the best score, how to get the worst score.
for(j=8;j++<88;)eval('a=patch_'+(j%4+1)+'_'+(j>>2)).parentNode.appendChild(a)
for(i=1;i<5;i++)for(j=2;j<22;)eval('a=patch_'+i+'_'+j++).parentNode.appendChild(a)
@espadrine
espadrine / OpenSans-Regular.json
Created January 18, 2014 20:33
Open Sans glyphs as SVG paths. Using glyph unicode character / &#x…; / glyph name as key (by order of fallback).
This file has been truncated, but you can view the full file.
{
"font-family": "Open Sans",
"font-weight": "400",
"font-stretch": "normal",
"units-per-em": "2048",
"panose-1": "2 11 6 6 3 5 4 2 2 4",
"ascent": "1638",
"descent": "-410",
"x-height": "1096",
"cap-height": "1462",
@espadrine
espadrine / color-cheat-golf.js
Last active January 3, 2016 16:39
Cheat on <http://www.colormunki.com/game/huetest_kiosk>. How to get the best score, how to get the worst score.
for(i=1;i<5;i++)for(j=2;j<22;)eval('a=patch_'+i+'_'+j++).parentNode.appendChild(a)
@espadrine
espadrine / format-font.svg
Created January 16, 2014 10:26
Badge comparison
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@espadrine
espadrine / template.svg
Created January 13, 2014 08:48
Using an OpenSans subset font. Contains 'a'..'z' and a space.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@espadrine
espadrine / build-passed.svg
Created January 2, 2014 12:49
Github badges. All svg images here are licensed CC0.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Automatic Generation of Random Names.
var vowels = ['a', 'e', 'i', 'o', 'u', 'y'];
// Most common letters, digraphs, trigraphs and doubles.
var graphs = ["e","t","a","o","i","n","s","r","th","he","an","in","er","on","re","ed","nd","ha","at","en","es","of","nt","ea","ti","to","io","le","is","ou","ar","as","de","rt","ve","the","and","tha","ent","ion","tio","for","nde","has","nce","tis","oft","men","ss","ee","tt","ll","mm","oo"];
var startWithVowel = graphs.filter(function(e) { if (vowels.indexOf(e[0]) >= 0) return e; });
var startWithConsonant = graphs.filter(function(e) { if (vowels.indexOf(e[0]) < 0) return e; });
function pick(l) {
@espadrine
espadrine / toml-argument.md
Last active December 14, 2015 04:29
Things I like / don't like about TOML

4 Things I Find Great About TOML

  • Arrays allow trailing commas!
  • Comments! (From a JSON perspective, that's huge!)
  • Dates are UTC!
  • Simple syntax, no semicolon / commas, no need to check for matching braces!

4 Things I Don't Like About TOML

@espadrine
espadrine / objectunion.js
Created February 2, 2013 23:54 — forked from puffnfresh/objectunion.js
Cannot resist. Must add memoization.
// Boilerplate
function objectUnion(definer) {
var defined = 0, length = 0, isDefined = false, definitions, key;
definitions = definer(function() {
var names = arguments, fold;
if(isDefined) {
throw new TypeError('This objectUnion has already been defined');
}
function wrapped(args) {