Compare commits

...

5 Commits

Author SHA1 Message Date
masterzu 66ba2ad745
.bash_aliases: remove sd 2025-06-25 00:14:10 +02:00
masterzu f3f6343b41
.bash_aliases: add vd=echo $DISPLAY 2025-06-25 00:13:21 +02:00
masterzu 3d2523b557
bashrc: fix func newpasswd 2025-06-25 00:12:12 +02:00
masterzu b08a97651c
mutt: add myhdr 2025-06-25 00:11:37 +02:00
masterzu e6764a482f
tmux add red bg if ssh connection 2025-06-25 00:00:02 +02:00
4 changed files with 39 additions and 16 deletions

View File

@ -15,6 +15,7 @@ alias cd='cd -P'
alias x='chmod +x'
alias nx='chmod -x'
alias m=make
alias vd='echo $DISPLAY'
# setfont
alias f32='setfont /usr/share/kbd/consolefonts/latarcyrheb-sun32.psfu.gz'
@ -56,6 +57,8 @@ alias lastf='/bin/ls -rt1|tail -1'
alias slf='run-mailcap "$(/bin/ls -rt1|tail -1)"'
alias vlf='edit "$(/usr/bin/ls -rt1|tail -1)"'
# tmux - force 256color
alias tmux='tmux -2'
# vim
alias vr='vim ~/.vimrc'
@ -106,9 +109,9 @@ alias kgp='kubectl get po'
alias kgd='kubectl get deploy'
alias kgs='kubectl get svc'
alias v=vagrant
alias vu='vagrant up'
alias vd='vagrant destroy'
# alias v=vagrant
# alias vu='vagrant up'
# alias vd='vagrant destroy'
# ssh

22
.bashrc
View File

@ -440,13 +440,21 @@ function lastfile () {
}
function newpasswd() {
# from llama 3.3 70B
tr -dc 'a-hj-km-no-pqrs-tuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ023456789' < /dev/urandom | fold -w 10 | head -n 1
# base64: pas une bonne idee car limite le nombre de caracteres
# date +%s | sha256sum | base64 | head -c 32 ; echo
# hexadecimal=base16: pire
# openssl rand -hex 32
# from perflexity.ai (juin 2025)
# version 32 cara parmi alnum + symboles [entropie = 6,25bits]
# cat /dev/urandom | tr -dc 'A-Za-z0-9!@#$%^&*()_+=' | fold -w 32 | head -n 1
# version 32 cara parmi alnum + symboles sans 1 i I l [entropie = 6,17bits]
cat /dev/urandom | tr -dc 'A-HJ-KM-Za-hj-km-z0234567890!@#$%^&*()_+=' | fold -w 32 | head -n 1
#
# version 32 carac parmi base64 [entropie = 6bits]
# (suppression du/des = final)
# openssl rand -base64 32 | tr -d =
# version 32 carac parmi les lettres et les chiffres (62 carac) [entropie = 5,95bits]
# cat /dev/urandom | tr -cd '[:alnum:]' | fold -w32 | head -1
}
## llm https://rez0.blog/hacking/2023/09/18/vim-llm-hacks.html

View File

@ -39,10 +39,16 @@ set-option -g history-limit 10000
set -g status on
set -g status-keys vi
# check config file is readen
# set -g status-left "CONFIG OK"
# Si connecté en SSH, changer la bg en red, sino en gree
if-shell 'env | grep -q SSH_CONNECTION' \
'set -g @bg red' \
'set -g @bg green'
set -g status-style "bg=#{@bg} fg=black italics"
# change color
set -g status-style 'bg=green fg=black italics'
# time et hostname
set -g status-right "#[fg=blue bg=black noitalics bold] %R #[fg=yellow nobold]#{user}#[fg=white bg=black noitalics bold]@#h #[bg=green fg=black ] "
set -g status-right "#[fg=blue bg=black noitalics bold] %R #[fg=yellow nobold italics]#{user}#[fg=white noitalics]@#[fg=#{@bg} bg=black noitalics bold]#h #[bg=#{@bg} fg=black ] "
# reload this file
bind r source-file /home/patrick/.tmux.conf \; display-message ".tmux.conf reloaded"

12
muttrc
View File

@ -90,9 +90,9 @@ bind pager <down> half-down
macro index .r ":source ~/.mutt/muttrc<enter>" "Reload muttrc"
macro index <esc>T <untag-pattern>
# urlscan
macro index,pager \cb "<pipe-message>urlscan<enter>" "open URL in urlscan"
macro attach,compose \cb "<pipe-entry> urlscan<Enter>" "call urlscan to extract URLs out of a message"
# urlview >> handle by tmux : ctrl-a u
# macro index,pager \cb "<pipe-message>urlview<enter>" "open URL in urlview"
# macro attach,compose \cb "<pipe-entry> urlview<Enter>" "call urlview to extract URLs out of a message"
# save messages
macro index >I <tag-prefix><save-message>=SERVICE.INFO<enter> 'save to service info'
@ -181,6 +181,10 @@ set attribution="Le %d, %n a écrit :"
#
# headers
#
# DEBUG
# set edit_headers = yes
ignore *
unignore from date subject to cc reply-to User-Agent Content-Length
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
@ -189,6 +193,8 @@ unignore X-j-chkmail-Status: X-Spam-Status: X-Amavis-Spam-Status: X-Renater-Spam
# reset header order
unhdr_order *
hdr_order Date: Subject: From: From To: Cc: reply-to: User-Agent: x-mailer: posted-to: List-Id: x-mailing-list: Content-Length: X-*:
send-hook . "unmy_hdr Reply-To:"
reply-hook . "unmy_hdr Reply-To:"
# pager
set pager_stop # dont exit at the end of the message with <space>