2023-08-16 08:41:12 +02:00
|
|
|
alias o="xdg-open"
|
2023-07-02 15:53:35 +02:00
|
|
|
|
2023-03-01 14:08:03 +01:00
|
|
|
alias pro="cd ~/Documents/Projects"
|
|
|
|
alias doc="cd ~/Documents"
|
2023-08-16 08:41:12 +02:00
|
|
|
alias vim="nvim"
|
2023-08-10 19:45:10 +02:00
|
|
|
alias int="cd ~/Documents/cours/licence/L3/stage/pasteur/projects/"
|
|
|
|
alias blog="cd ~/Documents/Projects/myself/log/"
|
2023-08-16 08:41:12 +02:00
|
|
|
alias cours="cd ~/Documents/cours/master/M1/S1/"
|
2023-08-10 19:45:10 +02:00
|
|
|
|
|
|
|
# Print field name from header with the field rank
|
|
|
|
csv_fields() {
|
|
|
|
local delimiter
|
|
|
|
delimiter="${2:-\t}"
|
|
|
|
local file
|
|
|
|
file="${1}"
|
|
|
|
head -n 1 "${file}" | tr "${delimiter}" "\n" | awk '{print NR, $0}'
|
|
|
|
}
|
2023-03-01 14:08:03 +01:00
|
|
|
|
2023-08-16 08:41:12 +02:00
|
|
|
alias edit="$VISUAL"
|
|
|
|
|
2023-03-01 14:08:03 +01:00
|
|
|
export templates_dir="~/Documents/Projects/templates"
|
|
|
|
alias new.td='copier "$templates_dir/latex/td.template"'
|
|
|
|
alias new.cm='copier "$templates_dir/latex/cm.template"'
|
2023-07-02 15:53:35 +02:00
|
|
|
alias new.letter='copier "$templates_dir/latex/letter.template"'
|
|
|
|
|
|
|
|
pdfcompress () {
|
|
|
|
gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dEmbedAllFonts=true -dSubsetFonts=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144 -sOutputFile="$2" "$1";
|
|
|
|
}
|
2023-03-01 14:08:03 +01:00
|
|
|
|
2023-08-16 08:41:12 +02:00
|
|
|
colorinvert() {
|
|
|
|
convert "$1" -channel RGB -negate "$(echo $1 | sed 's/\./-inv\./')"
|
2023-07-02 15:53:35 +02:00
|
|
|
}
|