Last active
July 13, 2017 05:26
-
-
Save dwaxe/3446be57e7ee6490a9f2cb6989fe262c to your computer and use it in GitHub Desktop.
my shell functions
This file contains hidden or 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 today () { | |
TODAYSTR=$(date "+%Y-%m-%d.txt") | |
if [ -f $TODAYSTR ]; | |
then | |
vim +3 $TODAYSTR | |
else | |
date "+%B %d, %Y" > $TODAYSTR | |
echo "" >> $TODAYSTR | |
echo "" >> $TODAYSTR | |
echo "" >> $TODAYSTR | |
vim -c 'startinsert' +3 $TODAYSTR | |
fi | |
} | |
function update () { | |
softwareupdate --install --all | |
(brew update && brew upgrade && brew cleanup && brew doctor) | |
mas upgrade | |
npm update -g | |
(pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U) | |
(gem update --system && gem update && gem cleanup) | |
upgrade_oh_my_zsh | |
(cd ~/.vim_runtime && git pull --rebase) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment