Skip to content

Instantly share code, notes, and snippets.

View kadamwhite's full-sized avatar

K Adam White kadamwhite

View GitHub Profile
@kadamwhite
kadamwhite / package.json
Created July 17, 2014 20:06
My best time: 9ms!
{
"name": "dream-speedrun",
"description": "Run through dream.js as fast as possible",
"main": "speedrun.js",
"scripts": {
"start": "node speedrun.js"
},
"license": "WTFPL"
}
@kadamwhite
kadamwhite / config.json
Last active August 29, 2015 14:07 — forked from anonymous/config.json
Custom bootstrap configuration for node wp demo
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#84bfed",
"@brand-success": "#975bfb",
"@brand-info": "#f2d890",
@kadamwhite
kadamwhite / brainstorming.md
Last active August 29, 2015 14:13
architecture-of-the-community.md

original outline

  • We architect applications for transparency and intercommunication, but our community is silo'd
  • Grunt vs Gulp, etc are false dichotomies
  • Many/most of us are in this business because we found a welcoming community: key component of the open part of open source
  • Current landscape appears sectarian, polarizing
  • We are not in opposing castles, we are living in cities inextricably linked by trade routes
  • We should take a step back and re-architect our community, with the same mindfulness we take in our applications
  • But in the community, two modules (groups) that do similar things are a strength: competition used to be considered a good thing! We wouldn't have Ember, Angular, etc or any of the others if it existed in isolation. Backbone is still relevant, and still inspiring new ideas (look at ampersand, new developments in marionette)
  • Relevancy and utility are not correlated to novelty
@kadamwhite
kadamwhite / analyze-image.pde
Created January 28, 2015 04:05
Take an image and recreate it with greyscale circles
// Declaring a variable of type PImage
PImage img;
// Define a function to turn an X and Y value into a one-dimensional
// array index, for use with acquiring individual pixels from the image
int getPixelIndex( int x, int y ) {
// Images are a set width: for each increase in y, we've
// effectively gone one width to the right and then wrapped
// around to the next line. Multiply the width by the number
// of times that wrapping has occurred (which line we are on,
@kadamwhite
kadamwhite / jmeas comments on views.txt
Last active August 29, 2015 14:14
The State of Marionette.js Views
at BackboneConf you mentioned that Marionette was likely going to drop down to just 2 layout primitives, iirc
jmeas 19 minutes ago
ya. hopefully!
kadamwhite 19 minutes ago
Is the idea there that you’ll deprecate two of the existing ones, or will there be a migration to a new thing?
(trying to decide whether to recommend Marionette on a project with a highly-nested UI)
jmeas 18 minutes ago
@kadamwhite
kadamwhite / hands-of-time.js
Last active August 29, 2015 14:15
Solve the "Hands of Time" temporal anomaly puzzles in Final Fantasy XIII-2
function Numbers( arr ) {
this.numbers = arr;
this.length = arr.length;
}
Numbers.prototype.wrapIdx = function( idx ) {
if ( 0 <= idx && idx < this.length ) {
return idx;
}
if ( idx >= this.length ) {

for q1, I've seen plugins that support eg

taskname: {
  options: {
    some: 'opts'
  },
  target1: {
 src: []
@kadamwhite
kadamwhite / git-diff-name-only.js
Created April 2, 2015 21:52
get changed files from Git, with Node
var diff = require('child_process').spawn('git', [
'diff',
'--name-only'
]);
diff.stdout.on('data', function (data) {
var files = data.toString().split('\n').filter(function(val) {
// Filter out ""
return val;
});
Johann Sebastian Bach (31 March [O.S. 21 March] 1685 – 28 July 1750) was
a German composer and musician of the Baroque period. He enriched established
German styles through his skill in counterpoint, harmonic and motivic
organisation, and the adaptation of rhythms, forms, and textures from abroad,
particularly from Italy and France. Bach's compositions include the Brandenburg
Concertos, the Goldberg Variations, the Mass in B minor, two Passions, and over
three hundred sacred cantatas of which nearly two hundred survive. His music
is revered for its technical command, artistic beauty, and intellectual depth.
http://en.wikipedia.org/wiki/Johann_Sebastian_Bach
@kadamwhite
kadamwhite / fonts.md
Created May 15, 2015 17:05
nice google web fonts