Git
Remove consecutive blank lines with
sed
before commiting codeI work as an SRE. And part of my job is to write
terraform
Infrastructure as Code to maintain and develop the company’s cloud offers.My colleagues and I were planing some code refactoring. And we wanted to somewhat raise the code-quality level. Part of this was to enforce some formatting rules. And, while
terraform
has thefmt
command which can recursively reformat code, it fails at fixing the no consecutive blank lines rule we wanted to enforce.Now, we’re all grown-ups here and we know this is not a task to be achieved by hand. Not only it’s tedious but also error-prone. It has to be automated so that no
git
commit ever contains such a thing, ever.Share
irssi
config without exposing passwordFor some reason, I recently needed to go back on IRC.
My IRC client of choice has always been
irssi
. It’s light, fast, CLI based and easily configurable.That being said, it has a major drawback : it stores passwords in plain text in the configuration file. Granted it’s not a very sensitive information. But still, it always discouraged me to add my
~/.irssi
folder to a remote version control system, even a private one.So, here I am on yet-another-machine, starting yet-another-configuration. But, this time, I dug a bit into it and found a working solution to this password issue.