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} |
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: |
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: |
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 |
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}) |
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 |
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 |
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()); | |
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"], |
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