Skip to content

Instantly share code, notes, and snippets.

View cmc19's full-sized avatar

cmc19

  • SSD Technology Partners
  • Delaware, USA
View GitHub Profile
.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';
}
(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) + ']'
//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 = {
@cmc19
cmc19 / 0_reuse_code.js
Created March 16, 2014 02:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cmc19
cmc19 / chrome.intellisense.js
Last active March 9, 2024 17:52
Visual studio intellisense file for chrome apps and extensions. Generated from latest source code.
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>
@cmc19
cmc19 / css_colors.js
Last active January 2, 2016 10:59 — forked from bobspace/css_colors.js
// 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",
@cmc19
cmc19 / kuler.js
Created December 26, 2013 20:34
Get adobe kuler colors
//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 />';