This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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)*) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SpecHelper | |
module Helpers | |
def default_serializer_options | |
{} | |
end | |
def serialization_scope | |
nil | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HelloController < ApplicationController | |
respond_to :html | |
class MyResponder < ActionController::Responder | |
def to_html | |
# controller | |
# options | |
# resource | |
# resource_location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beginPath(); | |
this.arrowShape(); | |
// Outset shadow | |
save(); | |
shadowOffsetX = 0; | |
shadowOffsetY = -1; | |
shadowBlur = 5; | |
shadowColor = 'rgba(255, 255, 255, 1)'; | |
fill(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[carlhuda@Carlhudas-iMac rango]$ echo 'gem "rango"' > Gemfile ; gem bundle | |
... | |
[carlhuda@Carlhudas-iMac rango]$ ./bin/rango --help | |
You have to install simple-templater first! |
NewerOlder