View gist:088df03a5aeafad0cd94fe9cfed8e5de
file="$1"
gs -dSAFER -dBATCH \
-dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite \
-sColorConversionStrategy=CMYK \
-dProcessColorModel=/DeviceCMYK \
-sOutputFile="${file%.pdf}_cmyk.pdf" \
"$file"
View gist:8cce37602be2c738e517
- Renaming all *.JPG files according the EXIF date taken of the picture (it gives : 2014-11-24_13-13-42.jpg) :
#jhead -n%Y-%m-%d_%H-%M-%S *.JPG
- Rotate all jpeg pictures of a directory :
#jhead -autorot *.jpg
- Rename & rotate recursively *.JPG files starting from local directory :
View gist:8a954562aa104942a376
server : PS1="\[\e[00;37m\][\[\e[0m\]\[\e[00;32m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[ 00;31m\]\H\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;36m\]\w\[\e[0m\]\[\e[00;37m\]] \[\e[0m\]"
local : PS1="\[\e[00;37m\][\[\e[0m\]\[\e[00;32m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[ 00;33m\]\H\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;36m\]\w\[\e[0m\]\[\e[00;37m\]] \[\e[0m\]"
View gist:263f4b548891bf53d14d
#!/bin/sh
USER="uid"
SERVER="hostname"
PORT="22"
SSHID="/volume1/homes/admin/.ssh/id_rsa"
SOURCE1="/var/lib/automysqlbackup/"
TARGET1="/volume1/homes/admin/backups/hostname/automysqlbackup/"
SOURCE2="/var/cache/rsnapshot/"
TARGET2="/volume1/homes/admin/backups/hostname/rsnapshot/"