Skip to content

Instantly share code, notes, and snippets.

@erlyvideo
erlyvideo / elixir_loader.erl
Created Sep 13, 2011
Erlang error_handler replacement
View elixir_loader.erl
-module(elixir_loader).
-include("../../elixir/include/elixir.hrl").
-export([undefined_function/3, undefined_lambda/3]).
undefined_lambda(M, F, A) -> error_handler:undefined_lambda(M, F, A).
undefined_function(M, F, A) ->
io:format("Lookup for module ~p~n", [M]),
Name = lists:flatten(io_lib:format("~p.ex", [M])),
@erlyvideo
erlyvideo / gist:881251
Created Mar 22, 2011
lib/sc_middleware.rb
View gist:881251
# config/environment/development.rb:
# require 'lib/sc_middleware'
# config.middleware.use ScMiddleware
class ScMiddleware
def initialize(app)
@app = app
SC::Rack::Service.filesystem = true
@project = SC::Project.load(File.dirname(__FILE__)+"/../public/self_video", :parent => SC.builtin_project)
@sproutcore = SC::Rack::Service.new([@project])