a guest Sep 17th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # This script is for me creating my brain dumps that I usually do jumping right into it in vim.
- # I have a template file also defined that I can setup if I want.
- # This script also brings me back to the same context that I was in earlier
- set -ex
- cd ~/brain-dumps/
- # Ex. 2019-04-14
- DATE=`date +%Y-%m-%d`
- if test -f "$FILE_NAME"
- echo "File exists. Opening existing for $DATE"
- # Simple template
- echo "# Brain dump $DATE" >> $FILE_NAME
- vim $FILE_NAME
- git add $FILE_NAME
- git commit -m "Brain dump $FILE_NAME"
- git push
RAW Paste Data