Skip to content

Instantly share code, notes, and snippets.

View jamiew's full-sized avatar

Jamie Dubs jamiew

View GitHub Profile
@jamiew
jamiew / heroku_unicorn_logger_fix.rb
Created March 28, 2012 15:25
Fix Heroku cedar app logging with Rails 3.1 and Unicorn
# config/environments/production.rb
# We're on Heroku, just output straight to STDOUT
# This is required because we're using Unicorn: https://github.com/ryanb/cancan/issues/511#issuecomment-3643266
config.logger = Logger.new(STDOUT)
config.logger.level = Logger.const_get(ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'INFO')
<meta property="og:type" content="vhxtv_ns:video" />
<meta property="og:title" content="Brimley's Breath" />
<meta property="og:image" content="http://b.vimeocdn.com/ts/617/924/61792473_200.jpg" />
<meta property="og:description" content="From inaugural Tricorn" />
<meta property="og:url" content="http://vhx.tv/1234" />
<meta property="og:video" content="http://www.vimeo.com/moogaloop.swf?clip_id=3102336" />
<meta property="og:video:url" content="http://vimeo.com/3102336" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="560" />
<meta property="og:video:height" content="315" />
:tddium:
:environment:
'RAILS_ENV': 'test'
/**
* ScratchOSC Android Client
* Renders Realtime ScratchOSC Data via OSC from a Turntable running ScratchOSC
* This was developed as part of the ArtHackDay at 319 Scholes, Brooklyn, NY
* January 26-28, 2012
* Written By: Daniel Moore
*/
//Copyright (C) 2012 Daniel Moore
//
@jamiew
jamiew / scratchml.xml
Created January 25, 2012 19:51 — forked from kylemcdonald/scratchml.xml
ScratchML draft spec v5 -- with <time> and <position> as <t> and <p>
<sml>
<!--
# SCRATCH MARKUP LANGUAGE, WORKING DRAFT
http://scratchml.com
* version -- minor versions for small changes, major for incompatibilities
* info -- general file metadata: author info, client info etc.
* turntable - hardware metadata
* mixer -- hardware metadata
@jamiew
jamiew / scratchml.xml
Created January 22, 2012 17:15
ScratchML draft spec v3
<scratch>
<!--
* info -- general file metadata: author info, client info et al
* audio -- info + raw data for audio recording, or links to external files
* transcription -- turntable markup (TTM)-style notation of fader cuts & hand movements
* turntable - hardware metadata
* mixer -- hardware metadata
* data -- actual fader/hand event data.
@jamiew
jamiew / logger_customizations.rb
Created January 4, 2012 03:21
Rails logger customizations I use in production apps
# config/initializers/logger_customizations.rb
# Production-only monkeypatches to make our logs awesome
# Monkeypatch 1
# Don't log common poller-style requests, they are just noise
class CustomLogger < Rails::Rack::Logger
def initialize(app, opts = {})
@app = app
@opts = opts
@opts[:silenced] ||= []
@jamiew
jamiew / newheroku.sh
Created November 30, 2011 23:56
Make a new heroku app and install common addons
#!/bin/sh
app="$1"
which -s heroku || (echo "no 'heroku' command. Try:\n\n\t gem install heroku" && exit 1)
heroku create $app
cd $app
heroku addons:add releases:basic
heroku addons:add memcached:5mb
heroku addons:add redis:nano
@jamiew
jamiew / .screenrc
Created September 27, 2011 23:05
My .screenrc
vbell on
defscrollback 5000
escape ``
startup_message off
screen -t bash 0 bash
screen -t bash 1 bash
screen -t bash 2 bash
screen -t bash 3 bash
@jamiew
jamiew / vhxenq.pl
Created September 20, 2011 02:13 — forked from lcapaldo/vhxenq.pl
Irssi script for automatically queueing video links to VHX.tv // via @elcapaldo on Twitter
use strict;
use Irssi;
use URI::Find::Rule;
use REST::Client;
use URI::Escape;
use vars qw($VERSION %IRSSI);
$VERSION = '0.01';
%IRSSI = (