View .spacemacs.el
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
;; Add OS X Layer
(setq-default dotspacemacs-configuration-layers '(osx))
)
View unfuck-messages.sh
#!/usr/bin/env bash
killall Messages Dock
open /Applications/Messages.app
View engima-encode.racket
(define (encode reflector rotor-l rotor-m rotor-r letter)
(list-ref alphabet
(rotor-translate-right (rotate rotor-r 1)
(rotor-translate-right rotor-m
(rotor-translate-right rotor-l
(reflect reflector
(rotor-translate-left rotor-l
(rotor-translate-left rotor-m
(rotor-translate-left (rotate rotor-r 1)
(letter-to-index letter))))))))))
View wealthfront-js-prep.js
// JavaScript variables belong to one of the following scopes: global or local(function).
// Basically, any variable defined outside of a function is a global variable. Variables
// defined inside of a function are scoped narrowly to that function, and any other
// functions defined within the scope of that function (explicit use of the var keyword assumed).
var myName = "john";
var capitalizeMyName = function() {
myName = myName.substring(0).toUpperCase() + myName.slice(1);
var name = myName;
View keybase.md

Keybase proof

I hereby claim:

  • I am mattbaker on github.
  • I am mattbaker (https://keybase.io/mattbaker) on keybase.
  • I have a public key whose fingerprint is 9563 2B6B 6E59 F85F 3B61 2419 40D9 A66D EFF9 425F

To claim this, I am signing this object:

View option.js
/*
* A Wealthfront-style Option implementation in Javascript implementing ES6 iterables
* Reference:
* http://eng.wealthfront.com/2010/05/better-option-for-java.html
*
* This only runs in current versions of Firefox.
* It's recommended you use the FF Scratchpad with the web console open to see logging results:
* https://developer.mozilla.org/en-US/docs/Tools/Scratchpad
*/
View zscroll.html
<html>
<head>
<title>Scrolling along the Z-Axis</title>
<!--
Example from http://eng.wealthfront.com/2012/03/scrolling-z-axis-with-css-3d-transforms.html
Assumes browser window is sized at a height of 400px (the size of the black box).
-->
<style>
body{height:600px;}
#viewport {
View thunk.js
function Thunk(fn) {
this.get = function() {
var v = fn();
this.get = function() { return v };
return v;
}
}
/*
* > var x = new Thunk(function() { console.log("working..."); return 2 * 2 * 2; })
View converttest.js
/* converttest.js: Send a PNG of a red square to STDOUT
* ex. node converttest.js > test.png
*/
var convert = require('child_process').spawn("convert", ["svg:", "png:-"]),
svgsrc = '<svg><rect height="100" width="100" style="fill:red;"/></svg>';
convert.stdout.on('data', function (data) {
process.stdout.write(data);
});
convert.stdin.write(svgsrc);
convert.stdin.end();
View jsdomtest.js
/* jsdomtest.js: Build a pie chart using d3.js and send the result to stdout
* Requires d3.js and d3.layout.js in same directory
* Requires pie.js from this gist: https://gist.github.com/1509145
* ex. node jsdomtest.js > pie.svg
*/
var jsdom = require('jsdom'),
scripts = ["file://"+__dirname+"/d3.min.js",
"file://"+__dirname+"/d3.layout.min.js",
"file://"+__dirname+"/pie.js"],