Skip to content

Instantly share code, notes, and snippets.

View maxmechanic's full-sized avatar
💭
🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈

~max mechanic~ maxmechanic

💭
🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈 🔈
View GitHub Profile
@maxmechanic
maxmechanic / starsToPinboard.js
Created March 12, 2013 16:25
Move a user's starred GitHub repos to Pinboard via Node.js
var GitHubApi = require('github');
var Pinboard = require('node-pinboard');
var _ = require('underscore');
var github = new GitHubApi({
version: "3.0.0"
});
var api_token = "user:NNNNNN";
var pinboard = new Pinboard(api_token);
@maxmechanic
maxmechanic / shownotesToPinboard.js
Last active December 14, 2015 21:09
My Node.js script for pulling shownotes into Pinboard. Requires 'npm install' or a package.json for dependencies.
var Shownotes = require('shownotes');
var Pinboard = require('node-pinboard');
var _ = require( 'underscore' );
var api_token = 'user:NNNNNNN'; //Pinboard API token found in Settings -> Password
var shownotes = new Shownotes();
var pinboard = new Pinboard(api_token);
@maxmechanic
maxmechanic / shownotesToPinboard-cli.js
Created March 17, 2013 14:36
Command-line script to pull links from 5by5 shownotes into Pinboard.
var shownotes = require('shownotes');
var Pinboard = require('node-pinboard');
var _ = require( 'underscore' );
var argv = require('optimist').demand(['network', 'show', 'ep','token']).argv;
var pinboard = new Pinboard(argv.token);
linksToPinboard(argv.network, argv.show, argv.ep);
@maxmechanic
maxmechanic / status.js
Last active December 15, 2015 22:09
My black belt in javascript.
modules.export = belts;
var belts = ['black', 'canvas'];
@maxmechanic
maxmechanic / es6curry.js
Created September 4, 2015 17:55
es6 curry
// es6 riff on https://medium.com/@kevincennis/currying-in-javascript-c66080543528
function curry(fn) {
const arity = fn.length
return (function resolver(...memory) {
return function(...args) {
const local = memory.concat(args)
const next = local.length >= arity ? fn : resolver
return next(...local)
};
@maxmechanic
maxmechanic / devsheet.js
Created October 28, 2015 00:53
devcard-inspired devsheet sketch
import React from 'react';
import Markdown from 'react-markdown';
const containerStyles = {
display: 'flex',
flexDirection: 'column'
}
const propSetStyles = {
padding: '3em 0',
margin: 'auto'