"I am sharing my code. I am not launching an open source project." -- Alan Gutierrez
# Assuming you're familiar with specifying query and sort options | |
# via the MongoDB console as shown here, you can specify these same | |
# options via the MongoHQ RESTful API using the approach shown in the | |
# file below. | |
$ mongo staff.mongohq.com:10095/one-rep-max -u REDACTED -p | |
MongoDB shell version: 2.0.4 | |
Enter password: | |
connecting to: staff.mongohq.com:10095/one-rep-max | |
> use one-rep-max; |
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
find . -type f -print0 | xargs -0 sed -i '' -E "s/[[:space:]]*$//" |
Date: May 30, 2009
- Design is all about dependencies
- If you refer to something, you depend on it.
RubyConf 2011 | 2011-09-29 | Gregory Moeck (@gregmoeck) | Slides
- Recommended as the best book on mocks: Growing Object-Oriented Software, Guided by Tests by Steve Freeman & Nat Pryce
- Common arguments against mocks
- They duplicate implementation
- They lead to brittle tests
- Mock objects + procedural programming = bad idea
- If you're doing traditional Rails development (which tends to follow more of a "procedural", do-this-and-then-do-that style), mock objects probably aren't for you
Last week, I published some ideas for leveling up as a developer. I put it on GitHub as a gist, and I encouraged people to modify the list to their liking:
Feel free to fork it and add more achievements. (Make sure they're measurable.)
Or, fork it and mark off the achievements you've already conquered. You might even flag the one that you're currently working on.
So far, more than 270 developers have forked this gist. Many devs have customized their forks as personal to-do lists (e.g., crossing off past achievements and highlighting the goal they're currently pursuing). A number of people have also added new achievements to their forks, indicating additional experiences that they
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
# generate a fresh app | |
rails -v | |
rails new whizbang | |
cd whizbang | |
# show empty log file | |
cat log/production.log | |
# script/runner successfully writes to the log file | |
./script/rails runner 'Rails.logger.error("Hello from script/runner")' -e production |
# git | |
alias gl='git pull' | |
alias gp='git push' | |
alias gd='git diff | mate' | |
alias gdh='git diff HEAD | mate' | |
alias gc='git commit -v' | |
alias gca='git commit -v -a' | |
alias gcap='git commit -v -a && git push' | |
alias gb='git branch' | |
alias gba='git branch -a' |