Wir waren ein paar Tage mit unseren Kindern (~5 und ~2) im Disneyland Paris. Vorweg: Der Park ist wirklich sehr cool gestaltet, die Fahrgeschäfte machen Spaß und die Shows sind super! Trotzdem würde ich es Familien mit kleineren Kindern (so grob unter ~8 Jahren) nicht vorbehaltlos weiterempfehlen. Hier mein gemischtes Fazit. Das ständige Hetzen & Anstehen Wartezeiten sind ein großer Faktor…
My Node.js app accepted an 8 MB image upload just fine locally, but the same upload failed with a 413 Content Too Large HTTP error on my Dokku-hosted instance. The reason: Dokku puts an nginx reverse proxy in front of your app, and nginx’s default client_max_body_size is just 1 MB. Anything larger gets rejected by nginx itself. The fix is a per-app nginx setting: 1 2 dokku nginx:set…
Alfred has a built-in feature to trigger system actions like shutdown, restart or lock directly from its search bar. Spotlight didn’t have this out of the box – now, with the recently revamped Spotlight & with a small AppleScript trick, you can add it yourself. Open the Shortcuts app and create a new shortcut. Add a “Run AppleScript” action and enter the following script: 1 2 3…
In vielen Städten, z.B. in München, werden Balkonkraftwerke ziemlich gut gefördert (mit bis zu 320€ bzw. 50% der Kaufsumme. Speicher werden mitgefördert): Förderung von Stecker-Solar-Geräten (Balkonkraftwerken) (FKG). Muss man aber vor dem Kauf beantragen ⚠️ Balkonkraftwerk Balkonkraftwerke sind überraschend günstig. Wir haben uns für dieses Balkonkraftwerk entschieden: Solakon Komplettset (1000W…
Imagine you are driving a car. You are coming across a redlight that is about to turn red. Your co-driver urges you to drive past it. Maybe they are in a hurry. You can say “No”. Even if this makes your co-driver angry and they will start arguing with you. But think about it this way: If something goes wrong - you have to speed up, and something happens, like touching another crossing…
General advice: You can access a list of all keyboard shortcuts via the “Preferences: Open Keyboard Shortcuts” menu (shortcut: ⌘+K, ⌘+S. Essentials ⌘+Shift ⇧+P: Show all commands (and search through them) Navigating F12: Go to Definition ⌥+F5: Go to Next Change Likewise, ⌥+⇧+F5 lets you “Go to Previous Change” ⌃+-: Go back (go to last cursor position) Likewise, ⌃+⇧+- lets…
When I am coding, I use the terminal a lot. Over the time, I have tried out different popular shells1: bash, zsh, and fish. For around one year now, I have settled for the fish shell. In this post, I want to explain how I got there, why I am very happy with fish, and how I have configured it. This is how my shell looks right now: If you are not sure which shell is the default on your system, look…
JSON gets used for a lot of different use cases. One of it: Config files. For example, you can configure the code editor VS Code via a settings.json config file. One downside: The original JSON specification disallows comments. But comments are very useful - for example, you could note why you have selected a specific config value, or write down alternative config values. VS Code allows comments…
jq is an awesome command line tool for working with JSON. You can use it to work with any kind of JSON output, e.g. JSON files or JSON logs. Nowadays, many tools offer JSON exports - you can use jq to extract the data you need, transform it into a different JSON structure, or do data aggegrations on it. It is a perfect tool for explorative data analytics on JSON files.
For that, we can use du, a command line tool to display disk usage statistics. du comes pre-installed on all Linux & macOS machines. 1 2 3 4 5 6 7 8 # Show the disk usage for every file in the current directory, incl. the directory itself in the last line. # `-h` flag for 'human-readable' output (= use unit suffixes like 'K' & 'M' for Megabyte, Kilobyte etc., # each unit based on the powers of…
Currently, we use a Huawei LTE router at home. I recently noticed that DNS resolution got very slow. By default, an operating system like macOS uses the router as DNS server. The router itself proxies these DNS request to the DNS server of your ISP. So, it seemed like our ISP’s DNS server had some performance issues. The performance did not get better in the following days. Therefore, I…
Choosing tasks Avoid Working Alone by Dan Moore I suggest that the first job you take be the one with the highest learning potential, not the highest earning potential. 10x more selective by Yossi Kreinin People often assume that 10x more productivity results from 10x more aptitude or 10x more knowledge. I don’t think so. Now I’m not saying aptitude and knowledge don’t help. But…
A couple of days ago, I decided to add a search feature to this blog. Why? Because I wanted to find some post about PHP, but wasn’t at my computer to search through the website files manually. I could have used Google and added site: markusdosch.com to the query, but I think it is nicer when a website provides search on its own. The challenge: This blog is just a bunch of HTML files,…
Sometimes, you need to generate a random n-character long string. E.g. a password, some API token,…While you could use an external tool (e.g. the password generator of your password manager of choice, e.g. KeePassXC) or a website (e.g. random.org), you can also easily achieve this via your command line. Here is a command that generates a 50-character random string, composed of upper and…
I am a big fan of the Caddy web server and use it for my private projects, as well as when teaching web development practices. Caddy has two main advantages compared to more established web servers like nginx and Apache: It offers automatic HTTPS out of the box. In the past, I have often used nginx for my websites. There, I had to install certbot to get Let’s Encrypt certificates & to update…
Tailwind CSS is a relatively new free open source CSS framework, that takes a different approach than most established frameworks like Bootstrap and Bulma. Instead of offering “abstract” CSS classes like .alert .alert-danger, that set a lot of CSS attributes, it builds on many small “utility classes” like p-4 text-red-700 border rounded border-red-900/10 bg-red-50. In the…
Allgemein Zu viele Versicherungen sind unnötig - hier die Versicherungen, die nach meiner bisherigen Recherche am sinnvollsten sind, sortiert nach Wichtigkeit (Achtung, subjektiv!): Pflichtversicherungen: Krankenversicherung, Kfz-Versicherung (falls man ein Auto hat) Haftpflichtversicherung Hausratversicherung Auslandskrankenversicherung: Insbesondere, wenn man nach außerhalb der EU reist.…
Start screen recording with Shift + Command + 5. A toolbar will show on the bottom, select the record mode & click “Record”. Stop the screen recording either by clicking the “Stop” button in the menu bar, or by using Command + Control + Excape. A thumbnail of the recorded video will show in the bottom right corner. You can either click on it & do some quick editing or…
With the Windows Subsystem for Linux (WSL & WSL2), Microsoft has brought a full Linux environment to Windows. I’ll show some tips and tricks, so software development on the WSL2 becomes even more fun! 💻 In my list, I focus on Ubuntu/Debian as Linux distribution. Most of the advice should be tranferrable to any distribution. File System The first thing to understand is that your Windows host…
Docker (Engine) Follow the installation steps for Ubuntu (not the ones for Windows or WSL2!) in the Docker Documentation. The easiest installation method is probably “Install using the repository”. The sudo docker run hello-world command won’t work yet (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Solution: In a separate…
Sometimes, I want to export my Slack messages to Markdown after I have sent it (Markdown is easier to archive - e.g. I am writing Tech Digest posts that I want to re-publish every year). Problem: This does not easily work - although Slack’s formatting syntax is relatively similar to Markdown, it does not offer a way to copy the message as Markdown. Solution: Paste to Markdown (Open Source on…
The error when starting a VirtualBox VM on macOS Monterey (12.1): 1 2 3 4 5 Kernel driver not installed (rc=-1908) Make sure the kernel module has been loaded successfully. where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT. The solution that worked for me: 1 sudo kextload -b org.virtualbox.kext.VBoxDrv Afterwards,…
Atomic Habits One of the most imporant things you can do to become more productive is to form habits that you stick to consistently. The book Atomic Habits talks about this. An important thought regarding habits: It is not important how much you do every day, it is much more important that you do it consistently every day. Two quotes that articulate this very well: Skipping a day during the first…
Ein paar Notizen aus dem Leben mit Baby (aus Papa-Sicht). Zu Beginn der Schwangerschaft Termin bei einer Geburtsklinik ausmachen: In München wird vom Klinikum Dritter Orden als Geburtsklinik geschwärmt (in Nymphenburg, gegenüber vom Botanischen Garten). Will man dorthin, sollte man schon extrem früh einen Termin ausmachen: Eine Anmeldung ist ab der 6. Schwangerschaftswoche möglich. Da uns mehrere…
Programming languages that are used for web development have changed significantly over the latest years. This means that there exist many old guides that teach outdated knowledge (their solutions generally still work, but often, you “would not do it this way” anymore). For beginners, this is confusing & makes it harder to get a mental model of web development. This document is an…
JupyterLab is a great way to interactively play around with Python, e.g. when doing data science, i.e. examining a data set. Here is my favorite way to install it. Main advantage in my opinion: This type of installation does not install JupyterLab globally, but scoped to a specific folder. Prerequisites Python 3.x (is installed by default on Ubuntu/Debian and macOS) The awesome Poetry Python…
1 csplit --quiet --elide-empty-files restore-mail-dump.txt '<REGEX_PATTERN>' '{*}' <REGEX_PATTERN> can e.g. be /^From:/ (e.g. when having a text file that consists of multiple emails). {*} stands for “Repeat this split forever (in constrast to e.g. just splitting the file for the first x times). Learn more on the respective explainshell.com output. Some more concrete examples for csplit…
macOS Alfred (Spotlight alternative. Has some cool features like triggering “Lock” & “Restart” directly from the tool) Magnet (https://magnet.crowdcafe.com) for Window snapping (both with shortcuts as well as moving windows to the edges) Rectangle is a great free alternative. homebrew (for installing tools. Both CLI tools as well as GUI tools. Use https://brew.sh for…
Name Type Cover Photo Review Dealer Review Date Rating Japan Sencha Fukujyu Green The first green tea that "clicked" for me. I like it a lot, especially with sweetener/sugar...though I'm not sure if that is how you are supposed to drink it. When brewing, the leaves open and it just looks beautiful. I like that you can brew green tea multiple times with the same leaves. Won't be my last green tea…
When you execute dpkg (the Debian Package Manager) with the --status flag (alternative: -s) & a package name, it outputs information about the package ⇒ it will tell you whether a package is installed or not. Example: 1 dpkg --status rsync See also: dpkg manual on explainshell.com
Windows has an autostart folder per user - every file that is in this folder will be started when the user logs in. To open the folder, press “Windows-Key + R”, and then enter: 1 shell:startup The explorer will open, with the autostart folder opened. Now, an easy way to add a program to this folder is: Create a shortcut by right-clicking on the file and choosing “Send to →…
Operating systems like Linux, Windows, and macOS have a hosts file. This file is used to manually map a domain name (e.g. example.com, or hello.world.local) to an IP address (e.g. 192.168.1.14, or 127.0.0.1). An individual entry looks like this: 192.168.1.14 google.com If you add this line to your hosts file and then open google.com in your web browser, your browser won’t do a request to an…
TLDR: Activate the Windows feature “Create symbolic links”, then symlinks within Vagrant/VirtualBox shared folders will work. How-to: SuperUser.com For some of our projects, we are using Vagrant with VirtualBox on Windows. If you do the same, one thing you probably noticed is that you then cannot use symlinks within shared folders. This is especially annoying as dependency managers…
Server-side 1 ssh-keygen -l -E sha256 -f /etc/ssh/ssh_host_ecdsa_key.pub Client-side 1 ssh -o FingerprintHash=sha256 <SERVER> Note: If your server does not use the default SSH port 22, you can add the parameter --port <PORT> before the <SERVER> part. Conclusion SSH fingerprints protect against Man-In-The-Middle (MITM) attacks. Both fingerprints should be equal to be safe against a MITM attack.…
When giving talks, I often want to show some small code samples on my slides. Of course, it should look nice and have syntax highlighting. This is not an easy feat. There are several options for showing code on your slides: You can use a presentation software that can manage source code highlighting out of the box, e.g. Reveal.js or the LaTeX beamer package You can convert the code to an image via…
Let’s Build A Web Server by Ruslan Spivak is simply the best deep dive introduction on web server fundamentals I have ever read. I already learned so much just by a first read (will have to re-read it soon!). I will have to incorporate & reference it in my Web Development: Overview & Basic Concepts document at some point… 😍
With some command line tools written in Go (like scc, a tool for counting a project’s lines of code), you’ll see install instructions like this: 1 go get -u github.com/boyter/scc/ But where is this package installed, how do you actually execute the command then? TLDR: In this case, the binary will be stored in /home/<USER>/go/bin/scc. Packages like this are installed into your GOPATH.…
A nice compilation of modern CLI tools I just found when browsing through HackerNews: https://github.com/ibraheemdev/modern-unix These tools are mostly replacements for “classic” CLI programs, with a stronger focus on UX (= “modern”). For me, the most interesting tools were fd (I find find very unintuitive to use), glances (especially the Docker container overview looks…
Different approaches for implementing a file system: https://gcallah.github.io/OperatingSystems/FileImplementation.html The way Linux does it: Inodes, default implementation nowadays: ext4 (Blog post) How to find a file’s Inode in Linux ls -li: -i flag reveals the file’s inode number stat <FILE>: View information about a file, incl. the inode number stat -f <FILE>: View information about a…
This is one of the things that is always very annoying when setting up a new computer & one of the things I always forget how to do. Open your ~/.bashrc or ~/.zshrc (depending on whether you use Bash or Zsh1) and append this line to the bottom of the file: 1 [ -z '$SSH_AUTH_SOCK' ] && eval '$(ssh-agent -s)' Open or create ~/.ssh/config and add these two lines: 1 2 Host * AddKeysToAgent yes Close…
Although I really like (subtle) animations on web pages, I never took the time to learn the fundamentals around CSS transitions. This has now changed - I found this awesome introductory guide by Josh Cameau via HackerNews: “An Interactive Guide to CSS Transitions” I am sure I will reference to it a lot! 😀 PS: If you want to get some inspiration what is possible with CSS transitions,…
After you have uploaded your SSH public key to websites like GitHub, they won’t show the complete key anymore - but instead show the key’s fingerprint. This is how you can calculate the fingerprint yourself (e.g. to compare them): 1 ssh-keygen -l -f <PATH_TO_KEY> -l stands for “Show the fingerprint”, -f <filename> for specifiying a file. This works with both the public as…
Parcel is my go-to asset bundler for small frontend projects consisting of mostly vanilla JS. It is generally zero-configuration and pretty smart about it - I can just install any npm package I want and use it in my code & Parcel will build nice minified JS assets for me. Much easier than Webpack… 😁 One interesting feature I came across: Tree Shaking, which means stripping out code from…
Wagtail is a very interesting Content Management system based on Django, with probably much less cruft compared to systems like Typo3, and maybe Wordpress. Companies like Mozilla are using it for new websites. Just learned about it by a co-worker at work, where we recently successfully introduced Django to a team. I have to check Wagtail out soon 😃
You want to learn web development? Then let me give you an overview & some pointers on some important basic concepts: When non-technical people are thinking of the web, they are thinking of web sites that they can access via their browser. That is why we will focus on that first. The most important concept to understand here is “request and response” aka “client and…
cat *.csv | sort --numeric-sort --key=2 --field-separator=, > total-sorted.csv You need to remove the redundant header lines manually afterwards. Via https://shapeshed.com/unix-sort/#how-to-sort-a-csv-file
In this document, I present my favorite best practices & resources on improving one’s coding skills. Warning: This document is not concerned with learning a programming language. It is directed at people who already know how to code, and who want to improve their craft. In the first part, I will pick & explain some concrete coding best practices & principles that are easy to follow and will…
Solution: Use the entr program. On a macOS with Homebrew, it can be easily installed with brew install entr. Then, you can run a command like that: 1 ls *.go | entr -r go run . Note: For solving the “unable to stat” problem, see https://github.com/eradman/entr/issues/36