Skip to content

Instantly share code, notes, and snippets.

@dwaxe
Last active July 13, 2017 05:26
Show Gist options
  • Save dwaxe/3446be57e7ee6490a9f2cb6989fe262c to your computer and use it in GitHub Desktop.
Save dwaxe/3446be57e7ee6490a9f2cb6989fe262c to your computer and use it in GitHub Desktop.
my shell functions
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