Skip to content

Instantly share code, notes, and snippets.

View mugizico's full-sized avatar
:shipit:

Cheeky Panda mugizico

:shipit:
  • Atlanta, GA
View GitHub Profile
jQuery.sharedCount = function(url, fn) {
url = encodeURIComponent(url || location.href);
var arg = {
url: "//" + (location.protocol == "https:" ? "sharedcount.appspot" : "api.sharedcount") + ".com/?url=" + url,
cache: true,
dataType: "json"
};
if ('withCredentials' in new XMLHttpRequest) {
arg.success = fn;
}
@mugizico
mugizico / README.md
Created October 8, 2015 22:04 — forked from mbostock/.block
Epicyclic Gearing

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

@mugizico
mugizico / hn_seach.js
Created April 1, 2016 19:08 — forked from kristopolous/hn_seach.js
hn job query search
function query() {
var
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments),
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.className === klass) {
@mugizico
mugizico / Kitchen-CheetSheet.md
Created June 27, 2017 18:37 — forked from arttuladhar/Kitchen-CheetSheet.md
Chef and Knife Commands CheatSheet

Kitchen Commands

kitchen list
kitchen create
kitchen login <InstanceName>