Skip to content

Instantly share code, notes, and snippets.

View jasemagee's full-sized avatar

Jason jasemagee

View GitHub Profile
@jasemagee
jasemagee / mount-syn-ds-nfs
Created May 30, 2015 10:00
Mounting an NFS Synology DiskStation folder (fstab)
192.168.1.x:/volume1/SharedFolder /media/LocalSharedFolder nfs nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0
@jasemagee
jasemagee / rsync-backup-with-exclusions.sh
Created May 30, 2015 09:52
Rsync to backup a directory (inc. sub directories) and ignore files/folders specified in an exclude file
# Command:
alias backup='rsync -av --delete --delete-excluded --exclude-from=/path/to/exclude/file /dir/to/backup/ /dir/backup/to/'
# -a archive mode. Shortcut to a bunch of other options typically used for archives.
# -v verbose. I run the command manually and want to see what is happening.
# --delete will remove files/folders from the backup target when deleted from the backup source
# --delete-excluded will remove files/folders previously backed up that have now been marked for exclusion
# Exclude file example (ignore rule per line):
# Downloads
# .cache
@jasemagee
jasemagee / fortune-rnd-cowsay-lolcat.sh
Created May 30, 2015 09:42
Fortune with random cowsay character and lolcat
fortune | cowsay -f "$(ls /usr/share/cowsay/cows | sort -R | head -1)" | lolcat