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
execute "notify airbrake" do | |
command %Q[bundle exec rake airbrake:deploy TO=#{deploy_environment} REVISION=`git log --pretty=format:'%h' -n 1` REPO=#{repository} USER=chef >> /tmp/airbrake.log] | |
user node.default_user | |
group node.default_group | |
end | |
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
# This knife.rb orig. provided by jtimberman@opscode.com - but any mistakes are mine! | |
current_dir = File.dirname(__FILE__) | |
platform = "https://api.opscode.com/organizations" | |
require 'grit' | |
branch = Grit::Repo.new("#{current_dir}/..").head.name | |
case branch |
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 'json' | |
require 'optparse' | |
all_json = [] | |
options = {} | |
options[:overwrite] = false | |
optparse = OptionParser.new do |opts| | |
opts.banner = "Usage: split-em -f FILE -d DATABAG [-o]" | |
opts.on( '-f' ,'--file FILE', 'JSON file to split') do |file| |
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
# Config for Nginx to act as a front-end for Riak | |
# The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc) | |
# Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_) | |
# Config is in /etc/nginx/sites-available/default or somewhere like that | |
# Set up load-balancing to send requests to all nodes in the Riak cluster | |
# Replace these IPs/ports with the locations of your Riak nodes | |
upstream riak_hosts { | |
server 127.0.0.1:8098; |
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
-module(port_scanner). | |
-export([scan/3]). | |
scan(Addr, Start, End) -> | |
Services = parse_services(), | |
scan(Addr, Start, End, Services). | |
%% Internal functions | |
scan(Host, Start, End, Services) -> | |
[Data || Data <- |
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
-module(port_scanner). | |
-export([scan/3]). | |
scan(Addr, Start, End) -> | |
Services = parse_services(), | |
scan(Addr, Start, End, Services). | |
%% Internal functions | |
scan(Host, Start, End, Services) -> | |
[Data || Data <- |
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
-module(port_scanner). | |
-export([scan/3]). | |
scan(Addr, Start, End) -> | |
Services = parse_services(), | |
scan(Addr, Start, End, Services). | |
%% Internal functions | |
scan(Host, Start, End, Services) -> | |
[Data || Data <- |
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 | |
ARGV = ['foo'] if ARGV.empty? | |
require 'rubygems' | |
require 'commander' | |
program :name, 'foo' | |
program :version, '1.1.1' | |
program :description, 'Foo' |