Last active
October 11, 2021 05:32
-
-
Save this-is-r-gaurav/3e7df96ce55aced463487eae48263d85 to your computer and use it in GitHub Desktop.
List of Commands that is used most frequently by me ...
This file contains 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
# To list all the status whether they are enabled or disabled. | |
systemctl list-unit-files --type=service | |
# Grep The ID of Docker image having some name NAME | |
NAME=$0 | |
docker ps | grep $NAME | awk 'print ${0}' | |
# To find a file that is not executable and is of text type | |
find . -type f ! -executable -exec file {} + | grep -w text | |
# To generate Random String | |
python3 -c "import string; import secrets; alphabet = string.ascii_letters + string.digits + '\!@\#\$%^*~\`{}[]\|:;\"\'<>?/,.()'; password=''.join([secrets.choice(alphabet) for i in range(128)]);print(password);" | |
# only assigne ssh key to specific local repo | |
git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment