Last active
May 23, 2022 10:07
-
-
Save cb-v4s/1a18b209be2690d64878bb128fe11160 to your computer and use it in GitHub Desktop.
misc
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
| ; find all the files containing `topsykrettz` str in the current folder excluding `node_modules` dir | |
| grep -iRl "topsykrettz" ./ | grep -v node_modules | |
| ; find all `mongodb+srv://` occurences in all git logs | |
| git log|grep commit|cut -d' ' -f2|while read commit; do git show $commit; done| grep -i mongodb+srv:// | |
| ; monitor logs in realtime | |
| tail -f logfile | |
| ; copy file content to clipboard | |
| cat xyz | pbcopy | |
| ; store git credentials | |
| git config credential.helper store | |
| git config --global credential.helper 'cache --timeout=3600' | |
| ; restore session | |
| fg | |
| ; detach tmux session over ssh | |
| tmux detach -P ; from remote connection | |
| ssh -t <user>@<addr> tmux attach ; restore connection | |
| ; discard local changes git | |
| git reset --hard | |
| git checkout <filename> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment