Read process env vars (replace 1 with pid)
cat /proc/1/environ | tr '\0' '\n' | sort
Generate a random alphanumeric string (replace 10 with string length)
LC_ALL=C tr -dc 'A-Z0-9' < /dev/urandom | head -c 10
Read process env vars (replace 1 with pid)
cat /proc/1/environ | tr '\0' '\n' | sort
Generate a random alphanumeric string (replace 10 with string length)
LC_ALL=C tr -dc 'A-Z0-9' < /dev/urandom | head -c 10
{ | |
"files.autoSave": "onFocusChange", | |
"git.enableSmartCommit": true, | |
"git.autofetch": true, | |
"editor.minimap.enabled": false, | |
"editor.fontSize": 14, | |
"go.lintTool": "golangci-lint", | |
"terminal.integrated.scrollback": 100000, | |
"git.confirmSync": false, | |
"terminal.integrated.fontSize": 14, |
alias gt='go test -race -timeout 20m ./... && echo "All passed! ✅" || echo "Failed! ❌"' |
Set current namespace
kubectl config set-context --current --namespace [NAMESPACE_NAME]
// Place your settings in this file to overwrite the default settings | |
{ | |
// Controls the font size. | |
"editor.fontSize": 14, | |
// The number of spaces a tab is equal to. | |
"editor.tabSize": 2, | |
// Columns at which to show vertical rulers | |
"editor.rulers": [80], |
function pr { git fetch origin pull/$1/merge && git checkout FETCH_HEAD; } |
scp ~/.ssh/id_rsa.pub remote-host:.ssh/authorized_keys
ssh remote-host
chmod 700 .ssh
chmod 640 .ssh/authorized_keys
If .ssh/authorized_keys already exists, you should append your key to it. Source https://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/
{ | |
"rules": { | |
"max-len": ["error", 35] | |
} | |
} |
// max len is 10 | |
function randomId(len) { | |
return Math.random().toString(36).slice(2, 2 + len); | |
} |
You can configure globally (for all projects) which files git should ignore | |
Just add them to $HOME/.config/git/ignore | |
For example if you use VS Code, add .vscode there so you don't have to add it to each .gitignore | |
Source: https://git-scm.com/docs/gitignore |