jq is useful to slice, filter, map and transform structured json data.
brew install jq
#### first class expresssion | |
variable "ami" {} | |
resource "aws_instance" "example" { | |
ami = var.ami | |
} | |
#### list & map | |
resource "aws_instance" "example" { | |
vpc_security_group_ids = var.security_group_id != "" ? [var.security_group_id] : [] | |
} |
Greg Vaughn posted this cool alias the other day:
copr = "!f() { git fetch -fu origin refs/pull/$1/head:pr-$1; git checkout pr-$1; } ; f"
Preferring to be a stock-tools person, I wanted to deconstruct this to see how I'd use it off-the-shelf without the alias.
git fetch -- I'm already familiar with this command
-fu -- these two flags I'm not sure are necessary, esp. -u since the help says,
"unless you are implementing your own Porcelain you are not supposed to use
As the domain logic gets more complicated and you begin moving toward a | |
rich Domain Model (116), the simple approach of an Active Record (160) | |
starts to break down. The one-to-one match of domain classes to tables | |
starts to fail as you factor domain logic into smaller classes. | |
Relational databases don't handle inheritance, so it becomes difficult | |
to use strategies [Gang of Four] and other neat OO patterns. As the | |
domain logic gets feisty, you want to be able to test it without having | |
to talk to the database all the time. | |
Fowler, Martin (2002-11-05). Patterns of Enterprise Application |
Every couple of weeks, I hear someone complaining about some difficulties with Bundler. Yesterday, it happened twice. But somehow I just never have those difficulties. I'm not saying Bundler is perfect; certainly in its early days it wasn't even close. But for the past two years it's been incredibly solid and trouble-free for me, and I think a large part of the reason is the way I use it. Bundler arguably does too much, and just as with Git, a big part of it is knowing what not to do, and configuring things to avoid the trouble spots.
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo
bundle install
mate Guardfile
bundle exec jasmine init
mate spec/support/yasmine.ym
bundle exec guard