vault write auth/userpass/users/caryyu password="xxxxxxxxxxxx"
vault auth list -detailed
vault policy list
vault write identity/entity name="caryyu" policies="policy-1,policy-2"
vault write identity/entity-alias name="caryyu" mount_accessor=auth_userpass_7cde8625
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.vim/plugged') | |
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } | Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'preservim/nerdcommenter' | |
Plug 'PhilRunninger/nerdtree-visual-selection' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'vim-airline/vim-airline' | |
Plug 'morhetz/gruvbox' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'tpope/vim-fugitive' |
主要使用 https://github.com/caryyu/cronexpr 命令工具
- MacOS -
cronexpr -n 1 "30 16 * * *" | {read t; date -r "$t"}
- Linux -
cronexpr -n 1 "30 16 * * *" | {read t; date --date=@"$t"}
- MacOS -
date -v+1d
/date -v-1d
/date -v+1H
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export VAULT_ADDR=https://xxx | |
export VAULT_TOKEN=xxx | |
export VAULT_PATH="secret/projects/xxxxxx/services/org-global/defaults" | |
rm -f ~/.we/org-global | |
OUTPUT=`vault list -format=json $VAULT_PATH | jq -c '.[]' | grep -v "env-file" | sed 's/"//g' | awk '{ print "vault kv get -format=json '$VAULT_PATH'/"$1" | jq .data.value | sed '"'"'s/\"//g'"'"' | awk '"'"'{print \""$1"=\"\$1}'"'"' >> ~/.we/org-global"}'` | |
eval $OUTPUT |
学习 goroutine
的异步执行并传参,具体参考:https://www.runoob.com/go/go-concurrent.html
package main
import (
"log"
"time"
)
This usage is based on the project of https://github.com/birdayz/kaf
- A Kafka cluster in your Kubernetes Cluster
- If you're in China, Please make sure you have the proxy setup in your Kubernetes cluster as what I did
比如某个目录 /secret
有如下文件:
📦/secret
┣ 📜AGE - 20
┗ 📜NAME - 李三
path=$1
NewerOlder