This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
check out perlis languages as well
# Filename $ | |
#!/bin/bash | |
$@ | |
# Add this to .bashrc | |
# PATH=$PATH:`pwd` |
class Originator | |
def state=(state) | |
puts "Originator: setting state to " + state | |
@state = state | |
end | |
def save_to_memento | |
puts "Originator: Saving to memento." | |
Memento.new(@state) | |
end |
class Convenient | |
instance_methods.each do |meth| | |
puts "We dont want anybody touching #{meth}" | |
private :"#{meth}" | |
end | |
def initialize | |
puts 'HA you cant do shit with me bitch' | |
end | |
end |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
check out perlis languages as well
(defn is-even? [n] | |
(if (= n 0) | |
true | |
(not (is-even? (dec n))))) |
# Define the Y combinator | |
module Y | |
extend self | |
def combinator(&generator) | |
lambda do |x| | |
lambda do |*args| | |
generator.call(x.call(x)).call(*args) | |
end | |
end.call(lambda do |x| | |
lambda do |*args| |
#!/usr/bin/env ruby -w | |
class Foo; end | |
f = Foo.new | |
f.instance_eval do | |
class << self | |
attr_accessor :baz | |
end | |
end |
Failures: | |
1) Admin::UsersController access is granted for social volt employees with role admin | |
Failure/Error: login_as(role) | |
NoMethodError: | |
You have a nil object when you didn't expect it! | |
You might have expected an instance of Array. | |
The error occurred while evaluating nil.delete | |
# ./spec/support/controller_macros.rb:10:in `login_as' | |
# ./spec/controllers/admin/users_controller_spec.rb:11:in `block (5 levels) in <top (required)>' |
GIT | |
remote: https://github.com/maxjustus/grant.git | |
revision: 89d6833e792f92ab8d3a7ce918ede53a2b9ebeb3 | |
specs: | |
grant (2.0.0) | |
GIT | |
remote: https://github.com/maxjustus/paperclip-s3.git | |
revision: 9a4fd58124f3960aee43261fdb368e72d87b5601 | |
specs: |
require 'distribution' | |
module Z | |
extend self | |
Z_EPSILON = 10e-16 | |
Z_MAX = 6.0 | |
def critical_z(p) | |
minz = -Z_MAX | |
maxz = Z_MAX | |
zval = 0.0 |