update
This commit is contained in:
parent
28ca42d375
commit
4104f13f25
12 changed files with 71 additions and 24 deletions
|
|
@ -14,5 +14,6 @@ export GEM_HOME="$HOME/gems"
|
|||
export XCURSOR_SIZE=24
|
||||
|
||||
export PATH="$HOME/.local/bin:$HOME/gems/bin:/usr/local/go/bin:$HOME/go/bin:/home/linuxbrew/.linuxbrew/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin/DSC:$PATH"
|
||||
|
||||
source $(brew --prefix)/share/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
|
|
|
|||
|
|
@ -64,3 +64,19 @@ tmux-new () {
|
|||
load-profile () {
|
||||
ansible-playbook /home/user/.dotfiles/ansible/.config/ansible/local.yml -K
|
||||
}
|
||||
|
||||
decode_base64_url() {
|
||||
local len=$((${#1} % 4))
|
||||
local result="$1"
|
||||
if [ $len -eq 2 ]; then result="$1"'=='
|
||||
elif [ $len -eq 3 ]; then result="$1"'='
|
||||
fi
|
||||
echo "$result" | tr '_-' '/+' | openssl enc -d -base64
|
||||
}
|
||||
|
||||
decode-jwtpayload(){
|
||||
decode_base64_url $(echo -n $1 | cut -d "." -f '2') | jq .
|
||||
}
|
||||
decode-jwtheader(){
|
||||
decode_base64_url $(echo -n $1 | cut -d "." -f '1') | jq .
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue