Steps to follow, Ref:
- Update Gemfile
bundle install
rails g rspec:install
- Edit
.rspec
################################################################################ | |
### namedtuple | |
################################################################################ | |
_class_template = '''\ | |
class {typename}(tuple): | |
'{typename}({arg_list})' | |
__slots__ = () |
Steps to follow, Ref:
bundle install
rails g rspec:install
.rspec
The point of sore or milk in hot cream. Any | |
Such matters. Boil for twenty minutes then | |
Whip made it properly and crumb of many | |
Cooks. Bake the public. Make the point. For men | |
To english cooks to swell them stew the skin | |
At once in every week we doubt the soles | |
Among the custard cut into a tin | |
Which sprinkle over each half pints of holes | |
And ham into a delicate digestion | |
And finish cooking. See page. Lemonade |
// .h | |
@interface NSNumber (Ranges) | |
- (NSRange)to:(NSNumber *)rangeEnd; | |
- (BOOL)isInRange:(NSRange)range; | |
@end | |
// .m | |
@implementation NSNumber (Ranges) |
source 'https://rubygems.org' | |
gem "method_source", "~> 0.8.1" |
#!/bin/bash | |
# Set up paths and whatnot | |
test -e ~/.bashrc && source ~/.bashrc | |
# We need tmux. Obvs. | |
if [[ -z `which tmux` ]]; then echo "You need tmux first!"; exit 1; fi | |
# Named variables are much more flexible | |
name="$1" |
Jim Weirich:
This is how I explain it… Ruby has Procs and Lambdas. Procs are created with
Proc.new { }
, lambdas are created withlambda {}
and->() {}
.
In Ruby 1.8,
proc {}
creates lambda, and Ruby 1.9 it creates procs (don't ask).
Lambdas use method semantics when handling parameters, procs use assignment semantics when handling parameters.
This means lambdas, like methods, will raise an ArgumentError when called with fewer arguments than they were defined with. Procs will simply assign nil to variables for arguments that were not passed in.
I want to write software that helps kill people.
Please, before you call the police and get my github account put on lockdown, allow me a moment to explain. What I really want to do is work on projects that advance the human condition and improve people's lives. I've been in a mad dash to learn how to program for the past four or five years exactly because I realized how much good I could do for the world with a computer.