In times of change, the learners inherit the earth - the learned find themselves...– Eric Hoffer
The greatest lesson in life is to know that even fools are right sometimes.– Winston Churchill
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”.
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 ...
F2. Proud Papa...
I totally just caught Thing 1 (almost 4) speaking Huttese while watching Return of the Jedi.
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
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...
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...
G. On Set: Empire Strikes Back →
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?!?!