Git config I like to have a global git config which takes care of my usual git setup like typical commands and abbreviations I use, my username and my email address. It can be helpful to adjust some of this information for a local project, e.g. when you are normally having your regular email address setup, but in one of the local folders you develop for a company you work for and you want to have your work email address instead.
Bash string manipulation
Bash string manipulation When I write bash scripts in my terminal, I often need to manipulate strings. Unfortunately, I often forget how to do this properly in bash, so I thought I’d write a blog article for me to remember better in the future. Hopefully it will be helpful for some of you developers out there as well. String manipulation in bash is not hard, but I find some of the notation a bit cumbersome especially when normally working more with Python or other languages.
How to properly manage ssh keys for server access
This article was on the hacker news frontpage. You can find the related discussion here. Every developer needs access to some servers for example to check the application logs. Usually, this is done using public-private key encryption where each developer generates their own public-private key pair. The public keys of each developer are added to the authorized_keys file on each server they should have access to. Painful manual changes So far so good.
Bash: Keep Script Running - Restart on Crash
When you are prototyping and developing small scripts that you keep running, it might be annoying that they quit when an error occurs. If you want very basic robustness against these crashes, you can at least use a bash script to automatically restart your script on error. The tool to use here is called until and makes this a breeze. Let’s use a dumb example Python script called test.py: import time while True: print('Looping') time.