This file contains hidden or 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
Aaron Tenderlove Patterson (<Your Birthdate> – ) is an American educator, software developer, and awesome guy. | |
Patterson is most famous for Ruby and Rails core, his god-among-men beard, and creating and hosting Friday Hugs, which feature his gentle, | |
soft-spoken personality and directness to his audiences. |
This file contains hidden or 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
int fib(int n) { | |
if (n <= 1) return n; | |
return fib(n - 1) + fib(n - 2); | |
} | |
main() { | |
print('fib(20) = ${fib(20)}'); | |
} |
This file contains hidden or 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
/* | |
Today I learned a few things. | |
1). D allows default parameters to appear at the beginning of a function signature if you want. | |
2). D can simulate Ruby blocks to an extent. | |
*/ | |
import std.stdio; |
This file contains hidden or 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
import std.stdio, std.string; | |
mixin template has_one(T, string name = null) { | |
T _method() { | |
T thing = new T(); | |
return thing; | |
} |
This file contains hidden or 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
1.9.3-p0 :031 > Bundler.definition.specs.each do | gem| | |
1.9.3-p0 :032 > puts gem | |
1.9.3-p0 :033?> end | |
#<Gem::Specification name=rake version=0.9.2.2> | |
#<Gem::Specification name=i18n version=0.6.0> | |
#<Gem::Specification name=multi_json version=1.0.4> | |
#<Gem::Specification name=activesupport version=3.2.1> | |
#<Gem::Specification name=builder version=3.0.0> | |
#<Gem::Specification name=activemodel version=3.2.1> | |
#<Gem::Specification name=erubis version=2.7.0> |
This file contains hidden or 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
Bundler.definition.index do |gem| | |
puts "#{gem.name}: #{gem.version}" | |
end |
This file contains hidden or 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 point = | |
object | |
val mutable x = 0 | |
method get_x = x | |
method move d = x <- x + d | |
end;; | |
let p = new point;; |
This file contains hidden or 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
app = Rails.application | |
session = ActionDispatch::Integration::Session.new(app) | |
session.admin_user_path(@user) |
This file contains hidden or 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
require 'active_model' | |
class Foo | |
include ActiveModel::Observing | |
def initialize(args = {}) | |
@bar = args[:bar] | |
notify_observers(:before_create) | |
notify_observers(:after_create) | |
end |
This file contains hidden or 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
bundle exec rake -T --trace | |
(in /home/app/blockshopper) | |
*** Using highline effectively in JRuby requires manually installing the ffi-ncurses gem. | |
*** jruby -S gem install ffi-ncurses | |
!!!! Missing jruby-win32ole gem: jruby -S gem install jruby-win32ole | |
rake aborted! | |
cannot load Java class javax.jms.Session | |
org/jruby/javasupport/JavaClass.java:1204:in `for_name' | |
org/jruby/javasupport/JavaUtilities.java:34:in `get_proxy_class' |