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 changeDir() { | |
foo=$(getRandomDir '/*/') | |
while [ 1 == 1 ]; do | |
if [ "$foo" != "" ]; then | |
builtin cd $foo 2> /dev/null | |
foo=$(getRandomDir '*/') | |
else |
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
defmodule Redis do | |
def get_conn do | |
{_, redis} = Redix.start_link host: Application.get_env(:auth, :redis_host), | |
port: Application.get_env(:auth, :redis_port) | |
redis | |
end | |
def kill_conn(redis_conn) do | |
redis_conn |> Redix.stop | |
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
while true; do echo `lsof -i -n -P | grep 6379 | wc -l` - `date`; sleep 1; echo ""; done |
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
alias taa="terraform apply -auto-approve" | |
alias tda=""terraform destroy -auto-approve" | |
function taaa { | |
run=${1:-1} | |
echo '------------------------' | |
print "APPLY NUMBER: $run" | |
echo '------------------------' |
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
Unshamelessly stolen from : https://stackoverflow.com/a/37720002 | |
Which unshameless stole it from : http://elweb.co/making-iterm-2-work-with-normal-mac-osx-keyboard-shortcuts/ | |
For this and other shortcuts go to preference -> profile -> keys, add the following shortcuts | |
# Move one word to the left | |
⌥← : Send Escape Sequence Esc+ b | |
# Move one word to the right | |
⌥→ : Send Escape Sequence Esc+ f |
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 vscode_install() { | |
plugin=$1 | |
if [ -x "$(command -v code)" ]; then | |
code --install-extension $plugin | |
fi | |
} | |
################# | |
# Install Xcode command line tools |