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 | |
# Use this script if you have 3 or more Chef Organizations | |
# and wish to speed up restores by using parallelism. | |
require 'fileutils' | |
require 'optparse' | |
CONCURRENCY = 1 | |
BACKUP_LOG = "restore_#{Time.now.strftime('%m%d%Y%H%M')}.log".freeze |
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 | |
# Use this script if you have 3 or more Chef Organizations | |
# and wish to speed up restores by using parallelism. | |
require 'fileutils' | |
require 'optparse' | |
CONCURRENCY = 1 | |
BACKUP_LOG = "restore_#{Time.now.strftime('%m%d%Y%H%M')}.log".freeze |
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
-------- | |
POST http://localhost:8151/derive_policy_pubkey/ethdenver2019 | |
post body: {} | |
return 200: {"result": {"policy_encrypting_key": "02c18c026169690658dcf93e5a0c7d19cff79cb6e7d02106ef3b62984a2157405e"}, "version": "0.1.0-alpha.14"} | |
-------- | |
POST http://localhost:5151/encrypt_message | |
post body: | |
{ | |
"message":"dGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2c=" | |
} |
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 | |
require 'fileutils' | |
require 'optparse' | |
CONCURRENCY = 1 | |
BACKUP_LOG = "restore_#{Time.now.strftime('%m%d%Y%H%M')}.log".freeze | |
SCRIPT_OUTPUT = 'chef-restore-by-org.sh'.freeze | |
ARGV << '-h' if ARGV.length != 6 |
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
filter { | |
ruby { | |
init => " | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
require 'openssl' | |
" | |
code => " | |
automate_url = 'https://a2.mychef.co/data-collector/v0' |
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 | |
require 'fileutils' | |
require 'optparse' | |
ARGV << '-h' unless [6,8].include? ARGV.length | |
$options = { | |
sql_host: 'localhost' | |
} |
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
#!/bin/bash | |
usage=" | |
This is a script used to configure your logstash tunables through delivery.rb, and to scale the number of \n | |
logstash processes running on your Automate server.\n | |
\n | |
You can specify the following options:\n | |
--workers The number of filter workers per logstash process. Defaults to number of virtual cores.\n | |
--total-procs The number of total logstash processes to run. Defaults to 2.\n | |
--heap-size The heap size allotted to each logstash process. Defaults to 2g.\n |
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
function bump_cookbook { | |
#export BUMP_TYPE=${1:-p} | |
declare -A bump_types | |
#bump_types=(["patch"]="p" ["minor"]="m" ["major"]="M") | |
bump_types["patch"]="p" | |
export SV=`grep -o '\([0-9]*\.[0-9]*\.[0-9]*\)' metadata.rb`; | |
sed -i -e "s/$SV/`eval increment_version -$1 $SV`/g" metadata.rb } | |
unset SV | |
alias bcma="bump_cookbook mmajor;git add metadata.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
function bump_cookbook { | |
#export BUMP_TYPE=${1:-p} | |
declare -A bump_types | |
#bump_types=(["patch"]="p" ["minor"]="mi" ["major"]="ma") | |
bump_types["patch"]="p" | |
export SV=`grep -o '\([0-9]*\.[0-9]*\.[0-9]*\)' metadata.rb`; | |
sed -i -e "s/$SV/`eval increment_version -$1 $SV`/g" metadata.rb } | |
unset SV | |
alias bcma="bump_cookbook mmajor;git add metadata.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
[user] | |
.... | |
[core] | |
editor = vim | |
pager = less -R | |
[merge] | |
tool = meld | |
[diff] | |
tool = meld | |
[alias] |
NewerOlder