Skip to content

Instantly share code, notes, and snippets.

View SlexAxton's full-sized avatar

Alex Sexton SlexAxton

View GitHub Profile
@SlexAxton
SlexAxton / updatechromium.sh
Last active December 15, 2015 02:49
add this function to your .zshrc or .bashrc file to update chromium to the latest nightly with a command.
updatechromium () {
Platform='unknown'
platform='unknown'
unamestr=`uname`
case "$unamestr" in
('Darwin') Platform="Mac"
platform="mac" ;;
('Linux') Platform="Linux"
platform="linux" ;;
(*) if [[ $# = 2 ]]
@SlexAxton
SlexAxton / example.mf.json
Last active December 20, 2015 03:49
A messageformat require plugin
{
"error_message_required" : {
"message" : "Required",
"contentType" : null,
"description" : "This is a message displayed to a user that inputs are required.",
"variables" : [],
"photos" : []
},
"error_message_minlength" : {
"message" : "{number, plural, one { # character too short } other { # characters too short } }",
@SlexAxton
SlexAxton / addressScaper.js
Created November 12, 2013 20:18
Scrape some country data
// First run: `npm install request q`
var request = require('request');
var Q = require('q');
var COUNTRIES = ['US'];
var BASE_URL = 'http://i18napis.appspot.com/address/data/'
function scrape(countries, cb) {
var datapromises = countries.map(function(country){
@SlexAxton
SlexAxton / bash_rc.sh
Created December 11, 2013 00:36
Run this to update chromium to the latest nightly on os x
updatechromium () {
mkdir -p /Applications/Browsers
Platform='unknown'
platform='unknown'
unamestr=`uname`
case "$unamestr" in
('Darwin') Platform="Mac"
platform="mac" ;;
('Linux') Platform="Linux"
platform="linux" ;;
@SlexAxton
SlexAxton / pictureshow.txt
Created December 17, 2013 19:25
Lyrics to The Ericks and Melanies "Picture Show"
The Ericks and Melanies - Picture Show
Time is tall as trees we sit in
looking for some bones to fit in
empty words to sticky notions
poetry for familiar motions
pen-strokes waiting to catch our faces
sort them into fashion places
here we hang our knuckles white
cause from up here things seem alright

Keybase proof

I hereby claim:

  • I am slexaxton on github.
  • I am slexaxton (https://keybase.io/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
SlexAxton / estmt1.4.7.js
Created April 1, 2014 18:05
An updated copy of American Expresses code on the recent activity page with some errors removed.
This file has been truncated, but you can view the full file.
/* jQuery v1.7.1 jquery.com | jquery.org/license */
(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
SlexAxton / test.hbs
Last active August 29, 2015 14:04
nested components
{{! QUESTION
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
SlexAxton / emotibarstests.js
Created August 5, 2014 06:07
Test that I'm passing for my emotibars compiler.
var Emotibars = require('../src');
var should = require('should');
describe('Emotibars', function(){
describe('Basic API', function() {
it('should be a function itself', function() {
Emotibars.should.be.a.Function;
});
it('should have a parse function', function() {