Skip to content

Instantly share code, notes, and snippets.

View nathanpalmer's full-sized avatar

Nathan Palmer nathanpalmer

  • Crowd Ox
  • Washington, DC
View GitHub Profile
@krisnova
krisnova / Terraform-Destroy-Provisioners.md
Last active January 20, 2018 20:04
Destroy Provisioners in Terraform

Destroy Provisioners in Terraform

Feature Spec - Issue #386

Terraform users would like to see Terraform support destroy provisioners that would run before a destroy action. There are many use cases documented in the terraform github issue #386 on how this would be helpful to users.

It seems the Terraform community has a shared consesus that custom destroy steps should be handled somehow with a terraform provisioner. This feature spec is an attempt to propose a solution to the following question.

What would be the best way to implement custom destroy action with provisioners?

# speed up pluck
class ActiveRecord::Relation
class RailsDateTimeDecoder < PG::SimpleDecoder
def decode(string, tuple=nil, field=nil)
if Rails.version >= "4.2.0"
@caster ||= ActiveRecord::Type::DateTime.new
@caster.type_cast_from_database(string)
else
@tim-evans
tim-evans / document_title.js
Created August 22, 2014 19:28
Document title mixin for Ember.Router
import Ember from "ember";
var get = Ember.get;
var copy = Ember.copy;
var removeObserver = Ember.removeObserver;
var addObserver = Ember.addObserver;
var DocumentTitleMixin = Ember.Mixin.create({
titleTokensDidChange: function () {
@CrshOverride
CrshOverride / fish_hg_prompt
Last active August 29, 2015 13:57
Updated version of __fish_hg_prompt that mimics the behavior of posh-hg.
function __fish_hg_prompt --description 'Promp function for Mercurial'
# Colors
set -l color_branch (set_color magenta)
set -l color_branch_behind (set_color red)
set -l color_cleanslate (set_color green)
set -l color_added (set_color green)
set -l color_modified (set_color blue)
set -l color_removed (set_color red)
set -l color_unknown (set_color magenta)
set -l color_deleted (set_color cyan)

A future version of Ember will come with a new templating engine known as HTMLBars.

The original motivation for HTMLBars was to allow helpers and properties to have better contextual information about what they were bound to.

So for example, consider a template like this:

<a href="{{url}}">{{link}}</a>
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@phred
phred / pedantically_commented_playbook.yml
Last active November 3, 2023 01:55
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@eligrey
eligrey / object-watch.js
Created April 30, 2010 01:38
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/