Checking exit code of the last process in Terminal


When setting up your tools for Continuous Integration one of the things that you will have to do is making sure you're exiting with the correct code.

An easy way to check the exit code of last process run in Terminal is simply to execute this command:

echo $?

While in most cases the exit code will be 0 (indicating successful execution of the process) this can be extremely useful for troubleshooting and ensuring your CI tool catches the errors correctly.

Tags: mac, terminal

Checking DNS zone file


Since I keep forgetting this command, I thought it would be rather useful for the moments when a custom DNS records are needed (i.e. setting up an external email provider).

dig -t ANY

Tags: dns, zone, terminal