init.vim and settings.vim go under ~/.config/nvim Follow the installation instructions for https://github.com/junegunn/vim-plug and place plug.vim in ~/.config/nvim/autoload
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 | |
function vault-aws () { | |
VAULT_PATH=$1 | |
if [ -z "$VAULT_PATH" ]; then | |
echo "Missing VAULT_PATH argument.\nExample: `vault-aws documents-store`" | |
exit 1 | |
fi | |
if [ -z "$VAULT_ADDR" ]; then | |
echo "Missing VAULT_ADDR env variable" |
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
-- 1. Create a new generic password entry in Keychain Access called "WHATEVER_AnyConnect_VPN" (the name in Keychain access must match that in line 39 below) with your password for the Cisco AnyConnect VPN server. | |
-- 2. Open this script in Script Editor (both this and the above are in the Applications->Utilities folder) and "Save as.." an Application (.app) with desired name. | |
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility. | |
-- 4. Enable the above .app so it can access Accessibility | |
-- 5. Copy and paste a nice icon on the generic Applescript icon (I used a copy of the default AnyConnect one) | |
-- 6. Add the new .app to /Users/[yourshortname]/Applications with a shortcut to your Dock | |
-- 7. Enjoy the fast connection with no need to enter password and increased security of not having a sensitive password stored as plain text | |
-- 8. Run script again to close connection | |
-- AnyConnect now refered to as targetApp |
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
"""An AWS lambda function for pushing VPC flow logs to Sumo Logic. | |
To use this you need to do a few things: | |
- In the Sumo Logic console create a new Hosted / HTTP collector (https://service.sumologic.com/help/Configuring_an_HTTP_Source.htm) | |
- Save the secret URL that is generated, you'll need it below | |
- Enable flow logs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html) | |
- Create a new Lambda function. If you're doing this in the console: | |
- Skip picking a blueprint | |
- Function name: FlowLogsToSumo |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowAllUsersToListAccounts", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:ListAccountAliases", | |
"iam:ListUsers" | |
], |
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
container_commands: | |
01-move-restart-hook: | |
command: cp -f .ebextensions/files/00_restart_containers_with_privileges.sh /opt/elasticbeanstalk/hooks/appdeploy/post/00_restart_containers_with_privileges.sh && chmod 755 /opt/elasticbeanstalk/hooks/appdeploy/post/00_restart_containers_with_privileges.sh | |
02-move-stop-hook: | |
command: cp -f .ebextensions/files/02stop_privileged_containers.sh /opt/elasticbeanstalk/hooks/appdeploy/pre/02stop_privileged_containers.sh && chmod 755 /opt/elasticbeanstalk/hooks/appdeploy/pre/02stop_privileged_containers.sh |
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
ubuntu@ip-192-168-0-246:~$ cat supervisord.conf | |
[supervisord] | |
nodaemon=true | |
[program:tracelyzer] | |
command=/etc/init.d/tracelyzer start -D | |
[program:apache2] | |
command=/usr/sbin/apache2 -DFOREGROUND |
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
source 'https://rubygems.org' | |
gem 'dashing' | |
## Remove this if you don't need a twitter widget. | |
gem 'twitter', '>= 5.9.0' | |
gem 'activeresource' | |
gem 'newrelic_api' |
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
if defined?(PhusionPassenger) | |
PhusionPassenger.on_event(:starting_worker_process) do |forked| | |
if forked | |
ActiveRecord::Base.clear_all_connections! | |
MysqlBase.establish_connection MysqlBase.configurations['mysql'][Rails.env] | |
end | |
end | |
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
#!/bin/bash -e | |
function run-vg-cmd() { | |
pushd $1 | |
eval $2 | |
popd | |
} | |
function usage() { | |
echo "Usage: $0 container from-vagrant-dir to-vagrant-dir" |