How to remove hard spaces from file using awk

Some tasks seem easy when we perform them manually, but new things come to light once we want to automate them. What can go wrong if we remove hard spaces from a text file using a script?

If it’s a one-time operation, we run the editor, use the find-and-replace functionality, and that’s enough. Otherwise, we need to find a more automatic-friendly approach.

Read more →

How to decrypt PDF files on macOS

Some companies send encrypted PDF documents. If you’re a macOS user, Preview will ask you for the password each time you use quick look or open the document. Moreover, if you print that document, you’ll end up with a blank sheet of paper. At least I got it. So secure.

Read more →

How to type letters with accents and diacritics in Emacs

I’ve heard a lot of good things about Emacs and Org-mode package as the approach to write and organize plain-text notes. I recently found a doom-emacs project and I decided to give it a try. Unfortunately, in the default configuration, I was unable to type polish characters. Here are two solutions, how to fix it.

Read more →

Draw.io real-time collaboration using Visual Studio Code and Live Share

You’ve probably heard about draw.io which is one of the best free, open-source diagramming software. The tool is powerful. It supports many storage backends and could be integrated into other apps. But the one crucial feature is still missing – it has lack of collaborative editing.

Remote collaboration is something we need these days. Last time, Visual Studio Code announced extension called Live Share, allowing developers to share their workspace with other people. In consequences, it opens a bunch of new possibilities!

Thanks to the VSCode, LiveShare and draw.io integration, you can bring the power of collaboration into draw.io.

Read more →

How to boot system from USB using GRUB

Almost every modern computer has a dedicated menu to choose from which device the system should boot. If not, there is an option in BIOS/UEFI to change that. But what if both options failed for some reason?

Read more →

Use make as task runner

During development, you probably take advantage of some extra command-line tools. In PHP world it could be a mess detector or program to check the code style. The framework you use also exposes some functionalities to clear cache, migrate database or generate documentation. All these commands are helpful but you need to look for them until you memorize the most useful ones. Sometimes you need to perform a task, like project initialization or restoring a stable snapshot of the database.
Read more →

Automatic file versioning after change using fswatch and git

I create a lot of notes. Seriously, I write tons of notes. Inspired by Getting Things Done method, I treat my mind as a thoughts generator rather than the storage. I capture thoughts, ideas, inspiring quotes, links, and pictures. Mostly using files.

Although I’m on the early stage of creating my custom note-taking solution, I’ve done some work to synchronize notes between devices and versioning them. In this article, I’d like to focus on the latter and I’m going to show you how to set up automatic files versioning.

I’m a software developer so, unsurprisingly, I use git to versioning my notes as well. Instead of manually committing changes, I take advantage of tools like fswatch and launchd to automate this process.

Read more →