TIL About CSS Attribute Selectors and Square Brackets in HTML

You can use CSS attribute selectors to target HTML elements. Let’s say you have this HTML snippet: <img alt="myPicName" src="/" /> <img alt="anotherPicName" src="/" /> You can style the first image by targeting the alt attribute and without changing the second image element. img[alt='myPicName'] { width: 100px; } When you use square brackets in HTML, it means something different: you group classes with square brackets. The brackets have no meaning, they are used for clarity.
Read more →

TIL About Git Pretty Log

Read more →

TIL About the i3 Scratchpad

Today I learned about the i3 scratchpad. The scatchpad is a special i3 window. You can use it as a window that opens your favorite program, e.g., a music player or editor. Examples:

Make the currently focused window a scratchpad bindsym $mod+Shift+minus move scratchpad # Show the first scratchpad window bindsym $mod+minus scratchpad show The first command moves the current window to the scratchpad and makes it invisible. With the second command you open the scratchpad and cycle through all windows.

Read more →

TIL About How To Create Ordered Lists in Vim Quickly

Today I found a cool trick on the Vim SubReddit: how to quickly create ordered lists. Here’s a screen-cast by rnevius: Steps Let’s say that you have a list: one item another item it’s an item Use <C-v> (CTRL + V), then I to select all lines at the start of the line and add a 0. in front of each: 0. one item 0. another item 0.
Read more →

TIL About React Native Expo

Today I learned about Expo, a toolkit/SDK for React Native development. Expo makes it easy to bootstrap a React Native code-base without having to install Android Studio or other tool-chains. Node.js and npm (or yarn) are the only requirements. Install via npm install expo-cli –global. Create a new project: expo init myProject && cd myProject expo start This will open up a browser window (“Expo Client”). Here you can open a new emulator, even a web emulator.
Read more →

TIL Copy With Clipboard in Vim Over Ssh

Today I tried using Vim over SSH on a remote machine. I needed to copy some configuration to the server. I opened Vim in the terminal (via SSH): vim config.txt I wanted to paste into the Vim buffer. I tried to use the "+p command in normal mode to paste from the system clipboard. Unfortunately, that didn’t work. [Solution][stackexchange]: The “clipboard” is a feature of X11, so you will need to enable “X11 forwarding” for the SSH connection in “trusted” mode:
Read more →

TIL Paste From System Clipboard Into Vim in Insert Mode

Today I learned how to paste into Vim in insert mode (and normal mode). When I write my blog posts, I often have to refer to material from the internet: other articles, blog posts, or books. That means that I will have to copy the title and URL from the web and paste it into my Vim editor. First of all, the "* and "+ [registers][vimregisters] are for the system clipboard.
Read more →

TIL About INSTALL_FAILED_INSUFFICIENT_STORAGE on Android

I’m working on a Flutter REST API. I type into the command-line: flutter run -v to start the application. But that doesn’t work: INSTALL_FAILED_INSUFFICIENT_STORAGE Why? There is still enough storage space on my local machine. The error is Android-specific. When you run the Android emulator, it creates an ADB device. When you develop your app, Flutter (or Android SDK) will install packages into ADB. It looks like that fills up the (virtual) storage space.
Read more →

TIL About Fish Abbreviations

Read more →

TIL How to Jump to Matching Bracket in Vim

I’ve started using Flutter, the mobile SDK for the Dart language. Dart reminds of Java and JavaScript. It’s quite verbose. If you have nested functions and classes, it’s hard to find the matching brackets and parentheses. Sometimes the start of a function or class is not on your screen, and it’s hard to get a quick visual overview. There are plugins that color the brackets differently, for example, Junegunn’s rainbow_parentheses.vim or luochen1990’s rainbow.
Read more →