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
[ | |
{"name":"Acid green","hex":"#B0BF1A","rgb":[176,191,26],"hsl":[65,76,43],"hsv":[65,86,75]}, | |
{"name":"Aero","hex":"#7CB9E8","rgb":[124,185,232],"hsl":[206,70,70],"hsv":[206,47,91]}, | |
{"name":"Aero blue","hex":"#C9FFE5","rgb":[201,255,229],"hsl":[151,100,89],"hsv":[151,21,100]}, | |
{"name":"African violet","hex":"#B284BE","rgb":[178,132,190],"hsl":[288,31,63],"hsv":[288,31,75]}, | |
{"name":"Air Force blue (RAF)","hex":"#5D8AA8","rgb":[93,138,168],"hsl":[204,30,51],"hsv":[204,45,66]}, | |
{"name":"Air Force blue (USAF)","hex":"#00308F","rgb":[0,48,143],"hsl":[220,100,28],"hsv":[220,100,56]}, | |
{"name":"Air superiority blue","hex":"#72A0C1","rgb":[114,160,193],"hsl":[205,39,60],"hsv":[205,41,76]}, | |
{"name":"Alabama crimson","hex":"#AF002A","rgb":[175,0,42],"hsl":[346,100,34],"hsv":[346,100,69]}, | |
{"name":"Alice blue","hex":"#F0F8FF","rgb":[240,248,255],"hsl":[208,100,97],"hsv":[208,6,100]}, |
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
result = []; | |
$('.wikitable tbody tr').each(function(){ | |
var color = {}; | |
color['name'] = $(this).find('th').text(); | |
var tds = $(this).find('td'); | |
color['hex'] = tds.first().text(); | |
var rgb = []; | |
tds.slice(1,4).each(function(){ | |
rgb.push(parseInt($(this).attr('title').replace('/255',''))); | |
}); |
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 rgbToHex(r, g, b) { | |
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1); | |
} |
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
String.prototype.capitalize = function() { | |
return this.charAt(0).toUpperCase() + this.slice(1); | |
} | |
String.prototype.title = function(force) { | |
//'examPLE'.title(); -> 'ExamPLE' | |
//'examPLE'.title(true); -> 'Example' | |
return (force ? this.toLowerCase() : this).replace(/(?:^|\s)\S/g, function(s) { return s.toUpperCase(); }); | |
}; |
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 randomPropertyName(obj) { | |
var keys = Object.keys(obj) | |
return keys[ keys.length * Math.random() << 0]; | |
} | |
function randomPropertyValue(obj) { | |
var keys = Object.keys(obj) | |
return obj[keys[ keys.length * Math.random() << 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
git branch gh-pages | |
git checkout gh-pages | |
git branch -D master | |
git push origin gh-pages | |
# Set gh-pages as default branch in admin interface | |
git push origin :master # delete master |
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
\newcommand{\enquote}[1]{``#1''} %enquote stuff nicely | |
\newcommand{\up}[1]{\ensuremath{^{\textrm{\small#1}}}} %Easy way of doing supercripts in text |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""[application description]""" | |
__appname__ = "[application name]" | |
__author__ = "[author]" | |
__version__ = "0.0" | |
__license__ = "GNU GPL 3.0 or later" | |
import logging, argparse |
NewerOlder