Today I learned

Perf

Resilience

Frontend

MacOS

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

Java

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)

Bash

OpenSSL

  • openssl genrsa -out key.pem 2048 Generates a private key in pem format
  • openssl rsa -in key.pem -outform PEM -pubout -out public.pem Extract a public key from the private one created above
  • ssh-keygen -t rsa -b 4096 -C "[email protected]" Generate a public / private ssh key in rsa format (Can be used with github)
  • ssh-keygen -t ed25519 -C "[email protected]" Github recommends creating a key with the ed25519 algorithm
  • Generating keys using OpenSSL
  • OpenSSL quick reference guide

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!)

Ansible

  • ansible-playbook -i "localhost" playbook-nagios.yml --list-tasks lists plays that will be run by ansible

Random

The Ergo Pro by Matias is my favourite ergonomic keyboard