Attach to an already attached screen

on January 09, 2020. in Software, Development. A 1 minute read.

Today I ran into a strange error with screen. I was working on a remote server, executing commands in screen when my connection got dropped. I reconnected, wanted to reattach to my screen session with the usual -r option:

Delete lines containing a pattern in vim

on January 08, 2020. in Software, Development. A 1 minute read.

Today I had to delete all lines from a CSV file where the last column has a 1:

From time to time I come across a mistake in unit tests that makes them useless. The mistake is that we use the class and method that we are testing to create the expected result of the test:

Making it easier to blog

on January 03, 2020. in Blablabla. A 2 minute read.

2019 was a not so great year for my blogging. 7 posts in total. There are multiple reasons for that, all the regular stuff like “I didn’t find the time” and “Nothing to blog about”.

Continue reading Making it easier to blog...

Filter git diff by type of change

on January 02, 2020. in Development, Software. A 1 minute read.

Yesterday I was looking at a rather large diff, but for the type of change I was after, I wanted to look only at the newly added files. Turns out, git diff has a filtering option with --diff-filter.

Continue reading Filter git diff by type of change...

Unit tests in legacy code

on November 22, 2019. in Programming, Development. A 3 minute read.

Legacy code has many definitions. It is code without tests. It is code written by someone else. It is code written X time ago. It is obsolete code that is difficult to replace with newer code. It is code that has no documentation. It is all of these things.

Continue reading Unit tests in legacy code...

PhpStorm previous version settings not imported

on March 29, 2019. in Software, Development. A 1 minute read.

PhpStorm 2019.1 was released yesterday. During the first run after the upgrade PhpStorm usually asks from what previous version would I like to import the settings from, but this time it didn’t ask that. It rather imported some of my old settings, but not the latest ones I had for 2018.3.

Use git reflog to split two squashed commits

on February 08, 2019. in Development, Software. A 3 minute read.

Today I was using interactive git rebase to squash some commits together to clean up the commit history of a git branch. At one point I went a bit overboard with it and squashed together two commits by mistake.

Vue.js reusable components

on February 04, 2019. in Programming, Development. A 5 minute read.

A while ago I started learning bits and pieces about Vue.js by creating a single page application for one of my pet projects that I use to explore Domain-Driven Design. In general I know my way around a Javascript file, but wouldn’t call myself an expert with it. In the past I mostly used jquery, some mootools, and even Dojo. Ah, good old Zend Framework 1 times.

Continue reading Vue.js reusable components...

Accessing Symfony private services in Behat

on February 01, 2019. in Programming, Development. A 2 minute read.

Since Symfony 3.4 the services in the service container are private by default. While this decision made us write better production code by making us use Dependency Injection more and rely on the service container less, using these services in a test environment proved to be a challenge.