How to sign you git commit

Created at: 2020-01-25 05:44:36 Updated at: 2020-01-25 05:44:49

in SSL

# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`

# check current keys:
gpg --list-secret-keys --keyid-format LONG

# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)

# Set a gpg key for git:
git config --global user.signingkey your_key_id

# ...

replace in sql file

Created at: 2020-01-03 16:51:31 Updated at: 2020-01-03 16:51:31

in MySql

Replace work in large sql file using bellow command.

sed -i '' 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g'


sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g'

nmap usefull commands

Created at: 2019-12-17 14:11:15 Updated at: 2019-12-17 14:11:33

in Linux

Look up which ip is used by which host

nmap -sn