Skip to content

Instantly share code, notes, and snippets.

View Calyhre's full-sized avatar
📝
Leading development on @sliteteam's editor

Charley DAVID Calyhre

📝
Leading development on @sliteteam's editor
View GitHub Profile
@ryanflorence
ryanflorence / rails-ey.jsx
Last active February 2, 2018 22:01
Rail-ey style routes
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={() => (
@ArnaudWopata
ArnaudWopata / understand_promises.js
Created July 7, 2014 15:28
Understand promises
var Q = require('kew');
function failureSync(){
throw new Error('sync failure');
};
function failureAsync(){
return Q.reject(new Error('async failure'));
};
@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
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
@raine
raine / spotify_mute_ads.rb
Created March 31, 2010 11:08
Mute Spotify ads on OS X
# 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.