Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.
| Action | Windows/Linux | macOS |
|---|---|---|
| New window | Ctrl+Shift+N | Cmd+N |
| Close window | Alt+F4 | Cmd+Shift+W |
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.
struct foo {
struct bar {
int x;| #!/usr/bin/env bash | |
| set -xeuo pipefail | |
| create_bridge() { | |
| local nsname="$1" | |
| local ifname="$2" | |
| echo "Creating bridge ${nsname}/${ifname}" |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| # Systemtap script to trace latency of concurrent memcached requests | |
| # as they percolate through the Linux kernel. | |
| # - Jacob Leverich <leverich@cs.stanford.edu> 2013 | |
| # | |
| # Note: You MUST call this script with "-x <TID>" where TID is the | |
| # *task id* of a memcached worker thread. This is usually PID+1 of | |
| # memcached. So do something like: | |
| # | |
| # % memcached -t 1 -d | |
| # % pgrep memcached |