A passion-driven Today I Learned initiative

A collection of concise write-ups on small things we learn day to day across a variety of languages and technologies.

11 TIL and counting…

URL shortener as TXT records

You need to take it with a grain of salt ;)

What’s your favorite database?

Mine is Route 53.

Read more →

Send signal to a child process

By default, when the exec.Cmd is used, the child process is assigned the main proces group. As a result, it receives signal sent to the main process too.

In a POSIX-conformant operating system, a process group denotes a collection of one or more processes. Among other things, a process group is used to control the distribution of a signal; when a signal is directed to a process group, the signal is delivered to each process that is a member of the group.

Read more →

Pass sensitive data to your CLI

Invalid approach

You shouldn’t use, echo command , environment variables, or CLI flags to pass a sensitive data to any CLI. The problem here is that it may be captured by shell history or process listings. So some 3rd party program can list running processes and steal sensitive data.

Read more →

Generate QR code for your WiFi login details

You can generate these codes using an online service, or using the QR generator of your choice and feeding it this text:

Read more →

Encrypt files via openssl

Sometimes you want to store some secrets in your git repository. It is a good practice to have them encrypted if stored externally (publicly). There are dedicated solutions such as git-secret or git-crypt. However, you can also achieve similar result with the openssl tool, which is quite often already preinstalled on your host.

Read more →