Skip to content

Instantly share code, notes, and snippets.


Alex Sexton SlexAxton

View GitHub Profile

Keybase proof

I hereby claim:

  • I am slexaxton on github.
  • I am slexaxton ( on keybase.
  • I have a public key whose fingerprint is 9D44 FE16 DDD6 80BC 06AD E471 13CE 42FD 3C33 F935

To claim this, I am signing this object:

SlexAxton / estmt1.4.7.js
Created Apr 1, 2014
An updated copy of American Expresses code on the recent activity page with some errors removed.
View estmt1.4.7.js
This file has been truncated, but you can view the full file.
/* jQuery v1.7.1 | */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement){cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close()
# Add this to your .bashrc or .zshrc
tmosh () {
mosh "$1" -- tmux -2 attach -t 0 -d
SlexAxton / test.hbs
Last active Aug 29, 2015
nested components
View test.hbs
How do I make the outer component send an attribute value into its sub-components,
or have the sub-components read from the parent attributes?
In the following example, the `multiple="true"` attribute changes the toggle group
to act like a set of checkboxes instead of a set of radio buttons, but the semantics
are more like an html 'select' menu.
<select multiple>
SlexAxton / emotibarstests.js
Created Aug 5, 2014
Test that I'm passing for my emotibars compiler.
View emotibarstests.js
var Emotibars = require('../src');
var should = require('should');
describe('Emotibars', function(){
describe('Basic API', function() {
it('should be a function itself', function() {;
it('should have a parse function', function() {
View jshintexample.js
/*jshint unused:false */
function test(a, b) {
var c, d = 2;
return a + d;
test(1, 2);
SlexAxton /
Last active Aug 29, 2015
msgpack requirejs plugin
"somekey" : {
"message" : "Submit",
"description" : "This is the label next to the button where the form is sent to the server."
"somekey2" : {
"message" : "Cancel",
"description" : "This is the text on the button that clears the form and sends you back to the page beforehand."
"excited_somekey" : {
View npm-debug.log
$ npm isntall
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/Users/alexsexton/.nave/installed/0.10.33/bin/npm" "isntall"
npm ERR! node v0.10.33
npm ERR! npm v2.1.7
npm ERR! Cannot find module '/Users/alexsexton/.nave/installed/0.10.33/lib/node_modules/npm/lib/isntall.js'
npm ERR!
npm ERR! If you need help, you may report this error at:
View chatlogember.txt
[19:57:23] SlexAxton: I have a dream about a url middleware/prefilter thing, and wanted feedback on the feasibility.
[19:57:51] SlexAxton: There are sometimes when I'd prefer a url to be displayed differently than ember likes to do it
[19:58:21] SlexAxton: One example in my app is kind of a global account setting
[19:58:25] SlexAxton: you can multiple accounts
[19:58:31] SlexAxton: and we want that reflected in the url
[19:58:45] SlexAxton:
[19:58:50] SlexAxton:
[19:59:13] SlexAxton: but really that should be a query param (foos and bars aren't 'under' the account)
[19:59:27] SlexAxton:
[19:59:49] SlexAxton: I'd love to be able to create a map for my urls onto the url that works best with ember
View gist:362179
// everyone's new favorite closure pattern:
(function(window,document,undefined){ ... })(this,this.document);
// when minified:
(function(w,d,u){ ... })(this,this.document);
// which means all uses of window/document/undefined inside the closure
// will be single-lettered, so big gains in minification.
// it also will speed up scope chain traversal a tiny tiny little bit.