add pwgen utility

Move common zsh/bash things into a separate file
Add pwgen utility to generate xkcd-style passphrases
This commit is contained in:
Adam Lamers
2016-11-04 17:11:25 -05:00
parent cb0b8a4a91
commit 35a45c9cae
6 changed files with 108 additions and 86 deletions
+3 -43
View File
@@ -33,49 +33,9 @@ shopt -s cmdhist
export HISTCONTROL=ignoredups
export HISTIGNORE="&:ls:[bf]g:exit"
function local_pi() {
LOCAL_PI_IP=$(en4ip)
ssh -b $LOCAL_PI_IP pi@169.254.100.100
}
#################### Project Initialization Tools ###################
function download_bootstrap() {
mkdir -p static
mkdir -p static/css
mkdir -p static/js
cd static/css
wget "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
cd ../
cd js
wget "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
cd ../..
}
function init_flask() {
mkdir -p templates
touch templates/index.html
curl "https://raw.githubusercontent.com/lewagon/bootstrap-boilerplate/gh-pages/index.html" > templates/index.html
FLASK_TEMPLATE="from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
if __name__ == '__main__':
app.debug = True
app.run()
"
echo "$FLASK_TEMPLATE" > app.py
}
function weather() {
LOCATION=milwaukee
curl wttr.in/$LOCATION
}
if [ -f ~/.common_shell_functions ]; then
. ~/.common_shell_functions
fi
#Enable ~/.ssh/config host tab completion
_complete_ssh_hosts ()