Missing Semester 10 - Potpourri
Miscellaneous programming topics and tools: keyboard remapping, daemons, virtual machines and more 💪
Keyboard remapping permalink
This usually involves some software that is listening and, whenever a certain key is pressed, it intercepts that event and replaces it with another event corresponding to a different key.
Further links for Karabiner (macOS) config:
👍 It's recommended to use goku
(and the .edn
format) for the Karabiner config file instead of .json
format, which is super bloated.
My current remappings:
CapsLock
-> another modifiter keyShift
+CapsLock
-> Caps LockRight Shift
+w
/a
/s
/d
-> right-side arrow keysCapsLock
+f
-> full-screen everythingCapsLock
+t
-> open terminal
Daemons permalink
Daemons are processes that are often started when the system is bootstrapped and terminate only when the system is shut down. Because they don’t have a controlling terminal, they run in the background. The programs that run as daemons often end with a d
to indicate so.
For example, sshd
, the SSH daemon, is the program responsible for listening to incoming SSH requests and checking that the remote user has the necessary credentials to log in.
🤔 What is the difference between daemons and launch agents?
Daemons are system-wide services that always run in the background, while agents describe regular services that are to be executed on user-specific events.
🤔 Where can I find launch daemons and agents?
~/Library/LaunchAgents
/Library/LaunchAgents
/Library/LaunchDaemons
/System/Library/LaunchAgents
/System/Library/LaunchDaemons
FUSE permalink
Filesystem in Userspace (FUSE) is a software interface for Unix and Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a "bridge" to the actual kernel interfaces.
FUSE is useful especially for writing Virtual file systems where you don't store/retrieve data from an actual disk.
Examples:
GmailFS
: filesystem which stores data as mail in GmailWikipediaFS
: View and edit Wikipedia articles as if they were real files
Backups permalink
APIs permalink
👍
Command-line Arguments permalink
--help
flag to display brief usage instructions for the tool.--dry-run
which only prints what the command would do but does not actually perform the change.-i
for “interactive” (especially for destructive actions)--version
or-V
for program version.--verbose
or-v
flag to produce more verbose output.-vvv
for even more verbose output--quiet
flag for making it only print something on error.-
in place of a file name means “standard input” or “standard output”, depending on the argument.-r
for recursive--
makes a program stop processing flags and options (things starting with -) in what follows, letting you pass things that look like flags without them being interpreted as such:rm -- -r or ssh machine --for-ssh -- foo --for-foo.
Window managers permalink
Rectangle (similar to RIP Spectacle) vs Magnet vs others
VPNs permalink
👍
Markdown permalink
👍
Hammerspoon (desktop automation on macOS) permalink
Hammerspoon is a desktop automation framework for macOS. It lets you write Lua scripts that hook into operating system functionality, allowing you to interact with the keyboard/mouse, windows, displays, filesystem, and much more.
Booting + Live USBs permalink
Live USBs are USB flash drives containing an operating system.
Docker, Vagrant, VMs permalink
Virtual machines and similar tools like containers, let you emulate a whole computer system, including the operating system.
Vagrant
is a tool that lets you describe machine configurations (operating system, services, packages, etc.) in code, and then instantiate VMs with a simple vagrant up. Docker
is conceptually similar but it uses containers instead.
Notebook programming permalink
Like Jupyter, for Python.
GitHub permalink
👍