From 067555dd63a286dda6f3c3783f96fb4d68ddb6d2 Mon Sep 17 00:00:00 2001 From: Nikolas Weger Date: Sat, 25 Jul 2015 12:49:41 +0200 Subject: [PATCH] Added SSHconnect and bin --- bin/caniuse | 24 ++++++++++++++++++++++++ bin/send | 26 ++++++++++++++++++++++++++ zsh/aliases.d/own.zsh | 7 +++++++ 3 files changed, 57 insertions(+) create mode 100755 bin/caniuse create mode 100755 bin/send diff --git a/bin/caniuse b/bin/caniuse new file mode 100755 index 0000000..c93b10c --- /dev/null +++ b/bin/caniuse @@ -0,0 +1,24 @@ +# CanIUse.com Command Line Search Utility +# Michael Wales, http://github.com/walesmd +# +# A very basic bash function that quickly searches http://caniuse.com/ +# +# Examples: +# caniuse +# caniuse border-radius +# caniuse "alpha transparency" counters "canvas drawings" html svg + +caniuse() { + local domain="http://caniuse.com/" + local query + + if [ $# -eq 0 ]; then + open ${domain} + else + for term in "$@"; do + query=$(python -c "import sys, urllib as ul; print ul.quote('${term}');") + open "${domain}#search=${query}" + done + fi +} + diff --git a/bin/send b/bin/send new file mode 100755 index 0000000..7d01019 --- /dev/null +++ b/bin/send @@ -0,0 +1,26 @@ +pull() { + if [ $# -eq 2 ]; then + git pull --rebase -q $2 `git rev-parse --abbrev-ref HEAD` + else + git pull --rebase -q origin `git rev-parse --abbrev-ref HEAD` + fi +} + +push() { + if [ $# -eq 2 ]; then + git push -q $2 `git rev-parse --abbrev-ref HEAD` + else + git push -q origin `git rev-parse --abbrev-ref HEAD` + fi +} + +send() { + git add "$(git rev-parse --show-toplevel)" + if [ $# -eq 1 ]; then + git commit -a -m "$1" + else + git commit -a -m "Updated Stuff" + fi + pull + push +} diff --git a/zsh/aliases.d/own.zsh b/zsh/aliases.d/own.zsh index 7ab45c1..b8a5ae5 100644 --- a/zsh/aliases.d/own.zsh +++ b/zsh/aliases.d/own.zsh @@ -18,3 +18,10 @@ sslcreate() { openssl x509 -req -days 365 -in csr/$1.csr -signkey private/$1.key -out certs/$1.crt } +if [ $(uname -n) = "sayaka"]; then + # SSH Connect + sshconnect() { + [ $1 = "web" ] && ssh megumi.eeleater.org + [ $1 = "mail" ] && ssh mail.eeleater.org + } +fi