Skip to content

Instantly share code, notes, and snippets.

View byronhulcher's full-sized avatar

Byron Hulcher byronhulcher

View GitHub Profile
@byronhulcher
byronhulcher / node-express-app.js
Last active August 29, 2015 14:05
Example Node.JS Express app
// Much code based on http://scotch.io/tutorials/javascript/build-a-restful-api-using-node-and-express-4
var express = require('express'); // call express
var app = express(); // define our app using express
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(function (req, res, next) {
@byronhulcher
byronhulcher / collatz.py
Last active August 29, 2015 14:06
Solution to to find longest Collatz Chain for values < N
// problem explanation at https://gist.github.com/outoftime/fc52bd13465d4aaaf1d9
collatz_cache = {1 : 0}
def find_maximum_collatz_chain(maximum_value):
maximum_length = 0
largest_value = 1
for num in range(2, maximum_value):
chain_length = get_collatz_chain_length(num)
if chain_length > maximum_length:
@byronhulcher
byronhulcher / index.js
Created October 7, 2014 02:56
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
document.body.appendChild(canvas)
var context = canvas.getContext("2d")
@byronhulcher
byronhulcher / index.js
Last active August 29, 2015 14:07 — forked from jasonrhodes/index.js
requirebin sketch
console.clear();
var twitter = require('twitter-text');
var linked = [];
var body = document.body;
linked.push(twitter.autoLink("<button>BUTTON</button> http://www.monoprice.com/Product?c_id=108&cp_id=10828&cs_id=1082806&p_id=9744&seq=1&format=2"));
linked.push(twitter.autoLink(twitter.htmlEscape("<button>BUTTON</button> http://www.monoprice.com/Product?c_id=108&cp_id=10828&cs_id=1082806&p_id=9744&seq=1&format=2")));
### Keybase proof
I hereby claim:
* I am byronhulcher on github.
* I am hypirlink (https://keybase.io/hypirlink) on keybase.
* I have a public key whose fingerprint is EE35 282B 246F 92F3 842B 1AC4 E477 238A F555 E4DA
To claim this, I am signing this object:
@byronhulcher
byronhulcher / OSFeels2015.md
Last active August 29, 2015 14:24
Conference Talk Pitches

So It Goes: Kurt Vonnegut on Project Management

"I was the victim of a series of accidents sprints, as are we all" - Kurt Vonnegut

Kurt Vonnegut (1922-2007) was an American author and humanist. In his book of autobiographical essays, A Man Without Country, he breaks down famous stories using graphs charting the main character's good or ill fortune as a factor of time. From a story about a character with good fortune who loses it all, then recovers it for a happy ending, to one where the protagonist wakes up to a bad day that only gets worse. In each of these stories the character goes through a series of changes between good and bad events. The satisfaction of the audience often depends on a well-meaning character winding up with a positive ending.

Similarly, aren't developers satisfied when they encounter their happy ending? Like fictional characters, we face obstacles and struggles with our work, but getting through those issues together is important to give us an opportunity to learn from the

@byronhulcher
byronhulcher / README.md
Created September 17, 2015 16:15
Kimono FE Research

Kimono FE Research

JS Libraries

Third-Party Services

Other

@byronhulcher
byronhulcher / index.js
Created March 17, 2016 21:17
requirebin sketch
var yo = require('yo-yo')
var numbers = [] // start empty
var el = list(numbers, update)
var input = document.getElementById('to-do')
function list (items) {
return yo`<div>
<button onclick=${update}>Add to-do</button>
<h3>To-Dos</h3>
@byronhulcher
byronhulcher / index.js
Created March 24, 2016 17:59
requirebin sketch
var yo = require('yo-yo')
var numbers = [] // start empty
var el = list(numbers, update)
var input = document.getElementById('to-do')
function list (items) {
return yo`<div>
<button onclick=${update}>Add to-do</button>
<h3>To-Dos</h3>
@byronhulcher
byronhulcher / index.js
Created March 25, 2016 20:28
requirebin sketch
var yo = require('yo-yo')
var numbers = [] // start empty
var el = list(numbers, update)
document.getElementById('container').appendChild(el)
var input = document.getElementById('to-do')
function list (items) {
return yo`<ul>
${items.map(function (item) {