Install Postgres on Ubuntu

Recently i decided to switch from MacOS to Linux. I was already an Ubuntu user from 2006 till 2015. So i am used to Linux. Nevertheless i struggled a little bit with the installation of PostgreSQL. For MacOS there is a nice all-in-one package which i recommend: Postgres.app. Everything works out-of-the-box there. In Ubuntu, on the other hand, we need to adjust the default installation a little bit in order to start application development....

July 26, 2019 · 4 min · Daniel Gerlach

Find and Replace in multiple files

As a software programmer you often have to search and replace a specific string in multiple files because of a refactoring or just improving a variable or function name. Normally you can use your IDE or your editor for this. But in bigger codebases with thousand or million lines of code it can be very slow. Neither do IDEs work with remote SSH-sessions. In such situations the command-line is pretty handy....

April 13, 2019 · 1 min · Daniel Gerlach

ag the_silver_searcher, a grep replacement

As a programmer you often search for a specific strings or regexps in multiple files. Previously i used to do this with the well-known GNU-tools find and grep. The following command searches for main in all *.go files in the current directory and: 1 2 find . -iname '*.go' | xargs grep -inH "main" # -i ignore case, -n print line number, -H print filename Recently i discovered ag the silver searcher....

April 13, 2019 · 1 min · Daniel Gerlach