Skip to content

Instantly share code, notes, and snippets.

View jsmestad's full-sized avatar
👾

Justin Smestad jsmestad

👾
View GitHub Profile
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

object :user do
object :profile do
object :nested do
attributes :property
end
end
end
@wacaw
wacaw / pird.rb
Created January 16, 2012 12:58
simple ruby sound visualization - with ruby processing
require 'ruby-processing'
# Pird
class Pird < Processing::App
load_library "minim"
import "ddf.minim"
import "ddf.minim.analysis"
load_library "control_panel"
@ehlyzov
ehlyzov / ffmpeg.rb
Created January 4, 2012 20:34 — forked from Flamefork/ffmpeg.rb
ffmpeg & carrierwave
module CarrierWave
module FFMPEG
extend ActiveSupport::Concern
module ClassMethods
def faststart
process :faststart => true
end
def transcode options
require 'formula'
class TmuxForIterm2 < Formula
url 'http://iterm2.googlecode.com/files/tmux-for-iTerm2-20120108.tar.gz'
md5 'f15d9f567b9b029482bb7b3227ee7ac3'
homepage 'http://code.google.com/p/iterm2/downloads/detail?' +
'name=tmux-for-iTerm2-20120108.tar.gz'
depends_on 'libevent'
@jsmestad
jsmestad / deferred_garbage_collection.rb
Created December 30, 2011 21:08
./spec/support/deferred_garbage_collection.rb
class DeferredGarbageCollection
DEFERRED_GC_THRESHOLD = (ENV['DEFER_GC'] || 15.0).to_f
@@last_gc_run = Time.now
def self.start
GC.disable if DEFERRED_GC_THRESHOLD > 0
end
@Flamefork
Flamefork / ffmpeg.rb
Created December 27, 2011 22:21
ffmpeg & carrierwave
module CarrierWave
module FFMPEG
extend ActiveSupport::Concern
module ClassMethods
def faststart
process :faststart => true
end
def transcode options
@jsmestad
jsmestad / application.rb
Created December 6, 2011 22:27
precompile all css and js.
# Precompile all assets
# config.assets.precompile = [ /\.coffee$/, /\.css\.scss\$/ ]
config.assets.precompile += [
Proc.new{ |path| File.basename(path) =~ /^[^_][\w\.]+?\.(js|css)$/ },
]
@kylefinley
kylefinley / main.coffee
Created November 21, 2011 11:47
SproutCore 20 Routing + Statechart
require 'sproutcore'
require 'sproutcore-statechart'
require 'sproutcore-routing'
App = SC.Application.create()
App.GlobalNavController = SC.Object.create(
home: -> App.statechart.gotoState 'home'
about: -> App.statechart.gotoState 'about'
)
@ryanflorence
ryanflorence / mediator.js
Created October 15, 2011 20:07
Localized Pub Sub
var mediator = function (obj) {
var channels = {};
if (!obj) obj = {};
obj.subscribe = function (channel, subscription) {
if (!channels[channel]) channels[channel] = [];
channels[channel].push(subscription);
};