openssl req -nodes -x509 -sha256 -newkey rsa:4096 \
-keyout example.org.key \
-out example.org.crt \
-days 356 \
-subj "/C=NL/ST=Zuid Holland/L=Rotterdam/O=ACME Corp/OU=IT Dept/CN=example.org" \
-addext "subjectAltName = DNS:localhost,DNS:example.org"
fzf c'est cool mais en non interactive il pète des erreurs de merde. Voilà la façon de le corriger.
Dans mon cas:
if [[ "$-" =~ "i" ]]; then
[ -f /usr/share/doc/fzf/examples/key-bindings.bash ] && source /usr/share/doc/fzf/examples/key-bindings.bash
[ -f /usr/share/bash-completion/completions/fzf ] && source /usr/share/bash-completion/completions/fzf
fi
un tool pour avoir un count visuel
cette personne es sans doute folle, en tout cas incroyablement courageuse de faire ça en bash x)
petites commandes bash utiles:
chronic: runs a command quietly unless it fails
combine: combine the lines in two files using boolean operations
errno: look up errno names and descriptions
ifdata: get network interface info without parsing ifconfig output
ifne: run a program if the standard input is not empty
isutf8: check if a file or standard input is utf-8
lckdo: execute a program with a lock held
mispipe: pipe two commands, returning the exit status of the first
parallel: run multiple jobs at once
pee: tee standard input to pipes
sponge: soak up standard input and write to a file
ts: timestamp standard input
vidir: edit a directory in your text editor
vipe: insert a text editor into a pipe
zrun: automatically uncompress arguments to command
10 piges de bash et je découvre encore des putain de commandes de base!
waw, un keyword pour faire du pseudo multiproc en bash ! c'est fou
Chances are that you’ve come to this page because just now you’ve been tearing your hair out trying to figure out some kind of problem with bash startup. Maybe an environment variable i…
une alternative à z
/ tree
qui permet le fuzzy find et surtout le cd
une fonction pour vérifier un certificat remote sur un local ca.crt
verify_cert ()
{
g=${PWD};
cd /tmp;
echo $2 | cut -c 1 | grep --color=auto -iEq '\.|\/';
if [ $? -eq 0 ]; then
capath=$2;
else
capath=$g/$2;
fi;
echo verifying $1 against $capath...;
openssl s_client -showcerts -connect $1 < /dev/null 2> /dev/null | openssl x509 -outform PEM > cert.pem && openssl verify -verbose -CAfile $capath cert.pem;
ret=$?;
cd -;
return $ret
}
un outil plus simple que ctrl+r (en fait c'est un wrapper) pour chercher dans bash history ❤️
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install