March 2012
32 posts
1 tag
“In times of change, the learners inherit the earth - the learned find themselves...”
– Eric Hoffer
Mar 5th
1 tag
“The greatest lesson in life is to know that even fools are right sometimes.”
– Winston Churchill
Mar 5th
The Twelve-Factor App →
Interesting take on Application Architecture from a maintainability and deployability perspective. While I don’t agree with everything (e.g. XI Logs), I do really like some of these points, especially “Config”, “Build, release, run” and “Disposability”.
Mar 5th
2 tags
Mar 1st
29 notes
6 tags
Mar 1st
5 notes
2 tags
Mar 1st
2 notes
February 2012
49 posts
4 tags
Feb 29th
3 tags
Feb 28th
7 tags
G. Ruby: Mocking HTTP Response body
I’m sure there are many ways to do this — probably better ways — but this is a simple way I’ve done it. class FakeResponse attr :body def initialize body @body = body end end describe Foo" do before(:each) do @data = File.read "./http/response/body.txt" Net::HTTP.stub!(:post_form).and_return(FakeResponse.new @data) end it "should return stuff" do ...
Feb 27th
1 note
2 tags
Feb 27th
18 notes
6 tags
F2. Proud Papa...
I totally just caught Thing 1 (almost 4) speaking Huttese while watching Return of the Jedi.
Feb 26th
4 tags
F2. Pro-Parenting Tip
Have your kid(s) get their PJs on 30 minutes to an hour before bed time when their motivated to do so quickly by something that want to do, as opposed to motivated to do so slowly at the prospect of going to bed. I’m sharing this, as it took me way too long to learn it on my own. :P
Feb 26th
Feb 25th
4 tags
G. Bash: past dates in epoch format
Here are some notes on converting dates to epoch and tweaking what dates are displayed. For the purpose of this, I’m trying to pass start and end dates in epoch format to a REST API. I’m looking for ranges which include: yesterday, last 7 days, last 14 days and last 31 days. Start Time Note: I set this up so that by changing the DAYS_AGO, you can control how far back in time you...
Feb 22nd
4 tags
G. Ruby: sourcing and setting environment varibles
I was looking for a simple way to source and set a bash environment variable from a file, in this specific instance, I can’t be 100% sure that the any steps I take to ensure that the file itself is sourced on the host before Rails is started, nor can I impact the format of the file itself (e.g. changing it to YAML). Here are the best options I’ve found. File.readline This is not...
Feb 21st
3 tags
Feb 21st
7 notes
2 tags
G. On Set: Empire Strikes Back →
Sweeeeet!
Feb 21st
F2. Hey Father...
Thing 1: Hey, father?
Me: Yes, daughter?
Thing 1: When is Mother going to be home?
We're been working on manners, but I have no idea where that came from?!?!
Feb 21st
Feb 20th
Feb 19th