Skip to content

Instantly share code, notes, and snippets.

View chrisgilbert's full-sized avatar

Chris Gilbert chrisgilbert

View GitHub Profile
@chrisgilbert
chrisgilbert / config
Last active May 5, 2022 14:10 — forked from jonnyyu/config
# add to ~/.aws/config and add the path to your folder.
[serverless-deployments-dev]
role_arn = arn:aws:iam::ACCOUNT_ID:role/ROLE-NAME
role_session_name = SESSION_NAME
region = eu-west-2
@chrisgilbert
chrisgilbert / findLongRunningOp.js
Created September 14, 2020 08:57 — forked from kylemclaren/findLongRunningOp.js
Find and (safely) kill long running MongoDB ops
db.currentOp().inprog.forEach(
function(op) {
if(op.secs_running > 5) printjson(op);
}
)
def authorize_key_for_root(config, *key_paths)
[*key_paths, nil].each do |key_path|
if key_path.nil?
fail "Public key not found at following paths: #{key_paths.join(', ')}"
end
full_key_path = File.expand_path(key_path)
if File.exists?(full_key_path)
config.vm.provision 'file',