Usefull Oneliners
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 591B

5 years ago
5 years ago
1234567891011121314151617181920212223242526272829
  1. # Usefull Oneliners
  2. ## vim
  3. * Set tab to 4 spaces:
  4. ```
  5. set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
  6. ```
  7. ## Shell
  8. * Find my public IP:
  9. ```
  10. dig +short myip.opendns.com @resolver1.opendns.com
  11. ```
  12. * Check if private and public ssh keys match:
  13. ```
  14. diff <(cat ~/.ssh/id_rsa.pub | cut -d' ' -f 2) <(ssh-keygen -y -f ~/.ssh/id_rsa | cut -d' ' -f 2)'
  15. ```
  16. References
  17. ------
  18. * https://stackoverflow.com/questions/1878974/redefine-tab-as-4-spaces
  19. * https://serverfault.com/questions/426394/how-to-check-if-a-rsa-public-private-key-pair-matched