workflow/assets/.bash_custom_aliases

188 lines
7.5 KiB
Bash
Raw Normal View History

2023-08-17 10:06:40 +02:00
#!/bin/bash
# these bash aliases are meant to be added in your user folder,
# in a file named: .bash_aliases (with the dot at the beginning)
# done for my blog http://www.cipherbliss.com
#
# load variables
#echo "load functions to sync files"
source ~/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh
############################ current
alias work="cd $www_folder/scripts/mapping_geojson_to_osm_tags"
########## lieux ###########
alias dok="docker-compose"
alias dc="docker-compose"
alias dckill="docker container kill $(docker container ls -q)"
alias gow="cd $WORKFLOW_PATH" # go to folder of nextcloud where i store my scripts
###### lieux locaux
alias goj="ssh -p 3910 tykayn@bbb.liness.org"
alias gopi="ssh pi@192.168.1.2"
alias gofat="ssh tykayn@192.168.1.7"
alias gowork="work"
alias gowww="cd $www_folder"
alias gox="ssh tykayn@proxmox.coussinet.org"
alias gok="ssh debian@ns3247177.ip-164-132-173.eu" # hébergement kimsufi
alias gonas="ssh $main_user@$IP_DU_NAS -p20522"
alias gos="cd $stockage_syncable_folder"
alias goa="ssh root@biliz.cluster.chapril.org"
alias goad="cd /home/poule/encrypted/stockage-syncable/photos/a_dispatcher"
alias goo="cd ~/Nextcloud/textes/orgmode"
alias gown="cd ~/Nextcloud/ressources/workflow_nextcloud"
alias gos="cd /home/poule/encrypted/stockage-syncable"
alias gomob="ssh -6 tykayn@mobilizon.vm.openstreetmap.fr -i .ssh/id_rsa_spaceship" # go to mobilizon osm26
################ personal info management - file management - PIM #########
alias gf="python $WORKFLOW_PATH/files_management/guessfilename_custom.py"
alias rff="python $WORKFLOW_PATH/files_management/rename_photo_folder.py"
alias m2a="move2archive --archivepath $stockage_syncable_folder/photos"
alias ex="exiftool '-filename<FileModifyDate' -d \"%Y-%m-%dT%H.%I.%S%%c.%%le\" -r"
alias ex2="exiftool '-filename<DateTimeOriginal' -d \"%Y-%m-%dT%H.%I.%S%%c.%%le\" -r"
alias ex3="exiftool '-filename<FileModifyDateTime' -d \"%Y-%m-%dT%H.%I.%S%%c.%%le\" -r"
alias ex4="exiftool '-filename<ModifyDate' -d \"%Y-%m-%dT%H.%I.%S%%c.%%le\" -r"
alias ex5="exiftool '-filename<CreateDate' -d \"%Y-%m-%dT%H.%I.%S%%c.%%le\" -r"
alias exgps="exiftool '-filename<GPSDateTime' -d \"%Y-%m-%dT%H.%I.%S%%c -- has_gps.%%le\" -r"
alias range="ts-node /home/poule/encrypted/stockage-syncable/www/development/html/rangement/index.ts --dry-run=true "
alias rangereal="ts-node /home/poule/encrypted/stockage-syncable/www/development/html/rangement/index.ts"
################ symfony3 ######################
alias sf="php bin/console"
alias sfdsu="sf doctrine:schema:update --dump-sql"
alias sfdsuf="sf doctrine:schema:update --force"
alias sfcc="sf cache:clear"
alias sfdcc="sf doctrine:cache:clear-metadata && sf doctrine:cache:clear-query && sf doctrine:cache:clear-result "
alias sfdge="sf doctrine:generate:entities"
alias sfdsv="sf doctrine:schema:validate"
alias sfdges="sf doctrine:generate:entities"
alias sffuc="sf fos:user:change-password"
alias c7="sudo chmod 777 -R"
alias ptest="phpunit -c app"
alias composer="/usr/local/bin/composer.phar"
alias sfad="sf assetic:dump"
alias sfai="sf assets:install"
alias yre="yarn run encore --dev"
alias yrep="yarn run encore --production"
################ system without graphic interface - command line ################
alias basha="gedit $ALIASES_PATH" # éditer les alisas
alias bashare="source $ALIASES_PATH" # recharger les alias
alias ainstall="sudo apt-get install" # installer un programme
alias tfa="tail -f /var/log/nginx/*.log" # suivi des erreurs de serveur
# update des paquets et nettoyage
alias aupg="sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get update -y && sudo apt-get upgrade -y"
################ système with X server ################
alias phps="bash /home/poule/encrypted/stockage-syncable/ressources/logiciels/PhpStorm-2020.1.4/PhpStorm-201.8743.18/bin/phpstorm.sh"
################ git helpers ################
alias gci="git commit"
alias gco="git checkout"
alias gst="git status"
alias gbr="git branch"
alias gpull="git pull"
alias gpush="git push"
alias gpoush="git push" # for slipping fingers
alias glg="git log --pretty=oneline"
alias myglg="git log --pretty=oneline --author=tykayn" # log pour seulement mes commits, utile pour un stand up deprojet Agile
alias gaci="git add . --all && git commit -m " # ajouter sans les tests js, donnez le message du commit entre guillemets suite à cette commande
alias gacio="goo && git add . --all && git commit -m "update orgmode files" && cd -"
alias gaaci="git add . --all && git commit -m " # ajouter sans les tests js
alias mysr="mysql -uroot -p"
################ other helpers
alias hgrep="history |grep"
alias whatport="sudo netstat -pna | grep "
alias runport="firefox https://localhost:$1"
export RUBY_ENV=devlopment
export GIT_AUTHOR_NAME="Tykayn"
export GIT_AUTHOR_EMAIL="contact@cipherbliss.com"
export NVM_DIR="$HOME/.nvm"
# développement
alias python=python3
alias py=python3
# rangement
alias findup="snap run czkawka"
alias ft="filetags --tagtrees --tagtrees-handle-no-tag \"has_no_tag\" --tagtrees-depth 2 --recursive"
alias netre="sudo service network-manager restart"
# syncronisations
alias getrise="rsync root@proxmox.coussinet.org:/poule/encrypted /home/poule/borg_archives/production-servers-backup/rise/ -avzPW --inplace --delete-before --exclude borgbackup_tkland" # get the backups of the riseup server
alias getrisefromjuvisy="rsync tykayn@proxmox.coussinet.org:/poule/encrypted/* /media/tykayn/disque_usb/backup_rise/encrypted -rvzPW --delete-before --exclude borgbackup_tkland --no-perms --no-group --exclude borg2 --exclude=do_not_sync_back"
#alias syncnas='export RSYNC_PASSWORD="pzqAaGRBMNoEnuXLAmWxjIHHhmTr2qgFCsD2hzZkGQfrkZ7g3WtFyHfYeDK9vWE7S9oMXMFH2XhcjvqrCWi5MDWX2tK9k5nf9M66Ad" &&
#rsync -avP --delete \
#"tykayn@192.168.1.8:/volume1/bidules_partagés/videos/*" \
# /home/poule/medias/videos'
alias ascan="sudo arp-scan --local"
# youtube dl
alias ydl='yt-dlp -o "%(title)s.f%(format_id)s.%(ext)s" '
alias ydla='yt-dlp -o "%(title)s.f%(format_id)s.%(ext)s" '
# stopper les messageries pour être au calme
alias oklm="killall gajim telegram-desktop signal-desktop dino-im"
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls="ls --color=auto"
alias grep="grep --color=auto"
alias fgrep="fgrep --color=auto"
alias egrep="egrep --color=auto"
fi
# some more ls aliases
alias ll="ls -alF"
alias la="ls -A"
alias l="exa -lh --git --all"
# extensions du path
export PATH=~/.local/bin:$PATH
export PATH="$WORKFLOW_PATH:$HOME/.emacs.d/bin:$HOME/.symfony/bin:$PATH"
# fix mastodon development
# export LD_PRELOAD=libjemalloc.so
export RAILS_ENV=development
# ----------------------------------------------------------------------
export HISTTIMEFORMAT="%d/%m/%y %T "
export EDITOR=nano
export HUGO_BASE_DIR="~/Nextcloud/textes/hugo"
export PATH=~/.cargo/bin:/snap/bin:$WORKFLOW_PATH/bin:$PATH
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
source $WORKFLOW_PATH/install/functions_sync.sh
source $WORKFLOW_PATH/install/functions_tk.sh
export HISTTIMEFORMAT="%d/%m/%y %T "
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
#gowork
# ------------------- work stuff
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$HOME/.dotnet:$HOME/.dotnet/tools
nvm use stable
#echo "loading zfs keys"
zfs load-key poule/encrypted
zfs mount -a