This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lookup = (namespace) => { | |
// if you really want rails-style indirection, you'd | |
// need an app container that could look up modules | |
// by strings. | |
} | |
const Resources = ({ namespace }) => { | |
const Layout = lookup(namespace, 'layout') | |
return ( | |
<Route path={`/${namespace}`} render={() => ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Q = require('kew'); | |
function failureSync(){ | |
throw new Error('sync failure'); | |
}; | |
function failureAsync(){ | |
return Q.reject(new Error('async failure')); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
#!/usr/bin/env ruby | |
# | |
# Mutes Spotify ads by monitoring Growl's output in syslog, and changing the | |
# system-wide audio output to dummy output when an ad is detected. | |
# | |
# == Installation | |
# | |
# 1. Install Soundflower (http://code.google.com/p/soundflower/) | |
# 2. Run the following command in your home directory, or wherever you prefer. |