Skip to content

Instantly share code, notes, and snippets.

View carllerche's full-sized avatar
😎
working

Carl Lerche carllerche

😎
working
View GitHub Profile
#[macro_export]
macro_rules! select {
// Done normalizing
(@ { $($t:tt)* }) => {
$crate::select_imp!( $($t)* )
};
(@ { $($t:tt)* } $b:pat = $f:expr => $h:block $($r:tt)* ) => {
$crate:select!(@{ $($t)* $b = $f => $h, } $($r)*)
};
module SpecHelper
module Helpers
def default_serializer_options
{}
end
def serialization_scope
nil
end
#0 get_object (state=<value optimized out>, call_frame=<value optimized out>, msg=<value optimized out>, args=<value optimized out>)
at vm/builtin/nativemethod.hpp:81
#1 invoke (state=<value optimized out>, call_frame=<value optimized out>, msg=<value optimized out>, args=<value optimized out>)
at vm/builtin/nativemethod.cpp:241
#2 rubinius::NativeMethod::executor_implementation<rubinius::OneArgument> (state=<value optimized out>, call_frame=<value optimized out>,
msg=<value optimized out>, args=<value optimized out>) at vm/builtin/nativemethod.cpp:659
#3 0x000000000055b48f in execute (state=0x10841e0, vmm=<value optimized out>, call_frame=0x7fffffffb3d0) at vm/inline_cache.hpp:194
#4 rubinius::VMMethod::interpreter (state=0x10841e0, vmm=<value optimized out>, call_frame=0x7fffffffb3d0) at ./vm/gen/instruction_implementations.hpp:526
#5 0x0000000000618157 in rubinius::Object* rubinius::VMMethod::execute_specialized<rubinius::OneArgument>(rubinius::VM*, rubinius::CallFrame*, rubinius::Dispat
class Signup
has_one :account, :map => { :account_name => :name }
has_one :user
def on_save
account.save
user.save
Membership.create :user_id => user.id, account.id
end
class Pack
def initialize(path)
@f = File.open(path, 'r')
end
end
class Index
def initialize(path)
File.open(path, 'r') do |f|
@f = f
class HelloController < ApplicationController
respond_to :html
class MyResponder < ActionController::Responder
def to_html
# controller
# options
# resource
# resource_location
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
begin
require File.expand_path('../config/application', __FILE__)
beginPath();
this.arrowShape();
// Outset shadow
save();
shadowOffsetX = 0;
shadowOffsetY = -1;
shadowBlur = 5;
shadowColor = 'rgba(255, 255, 255, 1)';
fill();
# DO NOT MODIFY THIS FILE
module Bundler
file = File.expand_path(__FILE__)
dir = File.dirname(file)
ENV["PATH"] = "#{dir}/../../bin:#{ENV["PATH"]}"
ENV["RUBYOPT"] = "-r#{file} #{ENV["RUBYOPT"]}"
$LOAD_PATH.unshift File.expand_path("#{dir}/gems/RedCloth-4.2.2/bin")
$LOAD_PATH.unshift File.expand_path("#{dir}/gems/RedCloth-4.2.2/lib")
[carlhuda@Carlhudas-iMac rango]$ echo 'gem "rango"' > Gemfile ; gem bundle
...
[carlhuda@Carlhudas-iMac rango]$ ./bin/rango --help
You have to install simple-templater first!