From 4355e5c6f02a2351e222bccee79be75573f13e28 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Mon, 16 Jul 2018 19:45:30 +0200 Subject: [PATCH] Added bash profile and aliases --- .aliases | 25 +++++++++++++++++++++++++ .bash_profile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .aliases create mode 100644 .bash_profile diff --git a/.aliases b/.aliases new file mode 100644 index 0000000..ed5b27f --- /dev/null +++ b/.aliases @@ -0,0 +1,25 @@ +alias ohmyzsh="mate ~/.oh-my-zsh" +alias private='set +o history' +alias uprivate='set -o history' +alias wion='networksetup -setairportpower en0 on' +alias wiof='networksetup -setairportpower en0 off' +alias blueon='blueutil power 1' +alias blueoff='blueutil power 0' +alias cli='python ~/Dropbox/python/cli.py' +alias plexloop='watch -n 4 python ~/Dropbox/Node-Com-Handler/old_v0.1/plexLoop.py' +alias load='/Volumes/keys/load' +alias sumcheck='python ~/python/sumcheck.py' +alias home='watch python3 ~/python/homeChecker/homeCheck.py' +alias lsd='ls -d */' +alias goo='~/./python/api/gooShort.py -c' +alias pirate='~/./python/pirateFetch/fetchPiratebay.py' +alias show='~/./python/seasonedShows/seasonedFolders.py' +alias llpass='lpass show -c --password' +alias subl='open /Applications/Sublime\ Text.app/' +alias playing='curl 10.0.0.45:31459/api/v1/plex/playing | python -m json.tool' +alias toggle='curl -X POST 10.0.0.67:3069/toggle > /dev/null 2>&1' +alias ip='~/.getip.sh' +alias forecast='~/python/termWeather/term_forecast/./term_weather.py' +alias trash='rmtrash' +alias del="rmtrash" +alias emoji="http https://api.kevinmidboe.com/api/v1/emoji -b" diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..aa4ed8a --- /dev/null +++ b/.bash_profile @@ -0,0 +1,47 @@ +export PS1="\W:$ " +export SHELL="/bin/bash" +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +HISTFILESIZE=10000 + +# import aliases from file +. ~/.aliases + +function vpn-connect { +/usr/bin/env osascript <<-EOF +tell application "System Events" + tell current location of network preferences + set VPN to service "VPN (midboe.ddns.net)" -- your VPN name here + if exists VPN then connect VPN + repeat while (current configuration of VPN is not connected) + delay 1 + end repeat + end tell +end tell +EOF +} + +function vpn-disconnect { +/usr/bin/env osascript <<-EOF +tell application "System Events" + tell current location of network preferences + set VPN to service "VPN (midboe.ddns.net)" -- your VPN name here + if exists VPN then disconnect VPN + end tell +end tell +return +EOF +} + +# Setting PATH for Python 3.4 +# The orginal version is saved in .bash_profile.pysave +# PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}" +# export PATH + +# Setting PATH for Python 3.6 +# The original version is saved in .bash_profile.pysave +PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" +export PATH + +test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"