Skip to content

Instantly share code, notes, and snippets.

Jax.getGlobal().ApplicationHelper = Jax.Helper.create
patch_world: ->
Jax.World.prototype.pick_all_visible = () ->
context = this.context
w = context.canvas.width
h = context.canvas.height
data = new Uint8Array(w*h*4)
data.w = w
data.h = h
data.f = f = 4
@sinisterchipmunk
sinisterchipmunk / install_homebrew.rb
Created February 15, 2012 16:16 — forked from mxcl/install_homebrew.markdown
get the ruby shebang from env so you can use non-standard ruby paths
#!/usr/bin/env ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like.
module Tty extend self
def blue; bold 34; end
def white; bold 39; end
def red; underline 31; end
def reset; escape 0; end
def bold n; escape "1;#{n}" end
@sinisterchipmunk
sinisterchipmunk / assets.rake
Created September 13, 2011 13:53 — forked from shedd/assets.rake
Check asset encoding for valid UTF-8; if not valid, show compatible encodings
namespace :assets do
task :check => :environment do
paths = ["app/assets", "lib/assets", "vendor/assets"]
paths.each do |path|
dir_path = Rails.root + path
if File.exists?(dir_path)
dir_files = File.join(dir_path, "**")