Skip to content

Instantly share code, notes, and snippets.

View sarnobat's full-sized avatar

sarnobat

View GitHub Profile

(for practical needs, not building blocks)

See also: https://github.com/sarnobat/unix

ssh through an intermediate when the destination doesn't support ssh

(e.g. using antec) From host that doesn't have ssh:

autossh -M0 -p 222 -R 9001:localhost:22 sarnobat@host.personaldomain.com

TODO: using the noun-verb grammar, systematically show the 7 different types of commands

  • :2,10s/pick/squash/g

  • :,10s/pick/squash/g

  • ~ toggle case

Misc

  • genealogy of unix text editors:
---
title: Raw Asseets to Published Products
---
flowchart TB
    n1[apple notes]
    n2[new.mwk]
    n3[snippets/.../snpt_*.mwk]
 n4[microlearning.git/*.md]

Mac OS new profile setup

  • Whenver too much bloat accumulates in a profile, or you get a new machine.
  • Get from ~/computers.git/2022/mac/bin/2022/mac_install_new_profile.sh
  • These are ranked in a hybrid order of priority (i.e. annoyingness) x difficulty

SSH enable

Remote Desktop enable

Sudo Passwordless

(draft 1) Obscure Shell Syntax

  • Like irregular verbs in a foreign language, the most common primitives are optimized for brevity rather than consistency, so often are illogical and idiomatic (you have to "just memorize" them to get the benefit).
  • --I'm organizing this by symbol rather than concept since there is a universal closed set of characters, but concepts have subjective implicit meaning (like key bindings)

$

  • $'' - verbatim string, no interpretting (useful if you have filenames with non ASCII characters)

    • $"" - verbatim string, no interpretting (except locale)