TIL – Today I learned

Perf

Resilience

Vuejs

MacOS

  • cmd + shift + . Reveals hidden files in a finder window. eg ~/.sdkman/

Python

  • python3 -m http.server 8000 Runs an http server in the current dir

Linux

  • zip -er a.zip a/ Creates an encrypted zipfile of contents with folders from a/
  • My yum cheatsheet
  • dd if=/dev/zero of=a.txt bs=1024 count=10240 Create a 10m “empty” file for testing (10k chunks, at 1024 bytes per chunk)
  • pstree -s tomcat Show processes containing tomcat in their commandline (brew install pstree)

MongoDB

  • mongodump --archive=a.gz --gzip --db <dbname> Take a logical db backup
  • mongorestore --archive=a.gz --gzip Restore a logical db backup
  • Update arrays in a document Modify an array in a document using $ and $[] notation

Postfix

  • postsuper -r [<QUEUEID>|ALL] Re-enqueue messages held back for a few days (Resets their timestamp for remaining in delivery queues)
  • qshape deferred Generates a report about messages in postfix queues, by email domain and time spent in queue (works for other postfix queues too!)