View gist:0bdb2a2fb906c5efe2c0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
include: myvars.yml | |
pre_tasks: | |
- debug: var=num_servers_to_provision | |
roles: | |
- {role: provision} |
View gist:5a2c89f6ae7fa1591403
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
vars_files: | |
# Todo: Find a way of putting this in another file and including it. Otherwise we'll be repeating it all over the place. | |
- ["inventory/group_vars/{{ env_name | mandatory }}.yml", "inventory/group_vars/empty.yml"] | |
- ["inventory/group_vars/{{ env_name | mandatory }}-{{ app_name }}.yml", "inventory/group_vars/empty.yml"] | |
- ["inventory/group_vars/{{ env_name | mandatory }}-{{ app_name }}-{{ role_name }}.yml", "inventory/group_vars/empty.yml"] | |
pre_tasks: | |
- debug: var=num_servers_to_provision | |
roles: |
View gist:a5a543bbab7fc90cbd16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
vars_files: | |
# Todo: Find a way of putting this in another file and including it. Otherwise we'll be repeating it all over the place. | |
- ["inventory/group_vars/{{ env_name | mandatory }}.yml", "inventory/group_vars/empty.yml"] | |
- ["inventory/group_vars/{{ env_name | mandatory }}-{{ app_name }}.yml", "inventory/group_vars/empty.yml"] | |
- ["inventory/group_vars/{{ env_name | mandatory }}-{{ app_name }}-{{ role_name }}.yml", "inventory/group_vars/empty.yml"] | |
pre_tasks: | |
- debug: var=num_servers_to_provision | |
roles: |
View gist:fb2d7173dc7266cf46c9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: tag_Name_MyApp:&tag_Env_staging:&tag_Role_web | |
roles: | |
- common | |
- web | |
- ruby | |
- mongos_client |
View gist:eec1992851991ea2e9c8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Try to find a contact that is connected to a node | |
// with an email addrss of bob@google.com or jerk@hello.com | |
// Pick the first one (there should never be multiple contacts with the same emails) | |
// but just in case, pick the first found) | |
MATCH (e1:Email)-[:EMAIL]-(c1:Contact) | |
WHERE (e1.address IN ['bob@google.com','jerk@hello.com']) | |
WITH e1,c1 | |
LIMIT 1 | |
// Create or make user based on ID | |
MERGE (u:User {id: 3}) |
View gist:3cb5ccdf664aadfd30e9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
puts "hello" | |
require 'tempfile' | |
puts ARGV[1] | |
filename,lines,prefix = ARGV | |
unless filename && lines |
View gist:e0cd53702799284484d9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
puts "hello" | |
require 'tempfile' | |
puts ARGV[1] | |
filename,lines,prefix = ARGV | |
unless filename && lines |
View gist:9377415
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//= require foo.js | |
(function($, _, Backbone){ | |
Backbone._ = _; | |
Backbone.$ = $; | |
}) | |
//= require bar.js | |
($.noConflict(), _.noConflict(), Backbone.noConflict()); | |
View param_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
#Ethon param test | |
describe Ethon::Easy::Params do | |
before do | |
@dataset = | |
[ | |
#basics | |
["http://a.com", {:foo => '1'}, "http://a.com?foo=1"], | |
["http://a.com", {:foo => 1}, "http://a.com?foo=1"], |
View gist:1365005
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |
NewerOlder