This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points | |
symbol_map U+E5FA-U+E62B Symbols Nerd Font Mono | |
# Devicons | |
symbol_map U+e700-U+e7c5 Symbols Nerd Font Mono | |
# Font Awesome | |
symbol_map U+f000-U+f2e0 Symbols Nerd Font Mono | |
# Font Awesome Extension | |
symbol_map U+e200-U+e2a9 Symbols Nerd Font Mono | |
# Material Design Icons | |
symbol_map U+f0001-U+f1af0 Symbols Nerd Font Mono |
This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).
Running this script should look the same in tmux as without.
curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]
struct foo {
struct bar {
int x;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now that you are able to create various forward or reverse SSH tunnels with lots of options and even simplify your live with ~/.ssh/config you probably also want to know how make a tunnel persistent. By persistent I mean, that it is made sure the tunnel will always run. For example, once your ssh connection times out (By server-side timeout), your tunnel should be re-established automatically. | |
I know there are plenty of scripts out there which try to do that somehow. Some scripts use a while loop, others encourage you to run a remote command (such as tail) to make sure you don’t run into timeout and various others. But actually, you don’t want to re-invent the wheel and stick to bullet-proof already existing solutions. So the game-changer here is AutoSSH. | |
TL;DR | |
autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -L 5000:localhost:3306 [email protected] | |
or fully configured (via ~/.ssh/config) for background usage | |
autossh -M 0 -f -T -N cli-mysql-tunnel |