Make a shell script executable
# add the following to the first line of the file
#!/bin/bash
# run this line to make executable
chmod u+x scriptname.sh
File sync / transfer
# transfer to WhaleMap
rsync -rtv file.txt hansen@whalemapvm:/srv/shiny-server/WhaleMap/
Automate tasks
# open crontab
crontab -e
# enable edits to crontab
a # this means 'append' in vim
# run every hour
0 * * * * sh /home/hansen/shiny-server/WhaleMap/get_live_dcs.sh
# run every 5 min (usually just for testing)
*/5 * * * * sh /home/hansen/shiny-server/WhaleMap/get_live_dcs.sh
# server side example
0 * * * * /srv/shiny-server/WhaleMap/get_remote_data.sh
# quit and save crontab
:x
# reload the shiny server
sudo systemctl reload shiny-server
# restart the shiny server
sudo systemctl restart shiny-server
# Delete
cat /dev/null >/var/mail/hansenjohnson # local
cat /dev/null >/var/mail/hansen # server
git reset --hard
git am filename
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
git checkout master
git merge dev