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
//run in console | |
var colors = []; | |
$('.themeBox > li').each(function(){ | |
var v =$(this).attr('title'); | |
colors.push(v); | |
console.log(v); | |
}); | |
var html = ""; | |
$.each(colors,function(){ | |
html+= this + '<br />'; |
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
// CSS Color Names | |
// Compiled by @bobspace. | |
// | |
// A javascript array containing all of the color names listed in the CSS Spec. | |
// The full list can be found here: http://www.w3schools.com/cssref/css_colornames.asp | |
// Use it as you please, 'cuz you can't, like, own a color, man. | |
var CSS_COLOR_NAMES =[ | |
"AliceBlue", |
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
var chrome = {}; | |
chrome.devtools = {}; | |
chrome.declarativeWebRequest = {}; | |
//#region Types | |
//#region Chrome.AccessibilityObject | |
chrome.AccessibilityObject = function () { | |
/// <field name='type' type='string'>The type of this object, which determines the contents of 'details'.</field> | |
/// <field name='name' type='string'>The localized name of the object, like OK or Password. Do not rely on an exact string match because the text will be in the user's language and may change in the future.</field> | |
/// <field name='context' type='string'>The localized name of the context for the object, like the name of the surrounding toolbar or group of controls.</field> | |
/// <field name='details' type=''>Other details like the state, depending on the type of object.</field> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
//adapted from https://github.com/kapouer/bytes.js | |
var util = util || {}; | |
(function (util) { | |
function bytes(size) { | |
if ('number' == typeof size) return convert(size); | |
var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb)$/i), | |
n = parseFloat(parts[1]), | |
type = parts[2].toLowerCase(); | |
var map = { |
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
(function (root) { | |
root.stringifySafe = stringify; | |
function stringify(obj, fn, spaces, decycle) { | |
return JSON.stringify(obj, getSerialize(fn, decycle), spaces); | |
function getSerialize(fn, decycle) { | |
var seen = [], keys = []; | |
decycle = decycle || function (key, value) { | |
return '[Circular ' + getPath(value, seen, keys) + ']' |
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
.loop(@counter) when (@counter > 0) { | |
.loop((@counter - 1)); // next iteration | |
.pm(@counter); | |
} | |
.pm(@px){ | |
.pd-lr-@{px}{ | |
padding-left:'@{px}px'; | |
padding-right:'@{px}px'; | |
} |