LazyVim

Summary

Notes taken on my learnings and usage of LazyVim.

Sources

LazyVim for Ambitious Developers

Dashboard Mode (lazyvim only)

The menu mode that opens when you open up Lazyvim without a file.

Normal Mode

<count><verb><count><motion> - structure of standard command

" - Open the registers mini-mode for pasting from
s - seek mode, select text that is visible
f - find mode
F - backwards find mode
t - To mode

[Read More]

Port Forwarding

SSH

Local Port Forwarding

Open a tunnel from the client to a server. AKA trying to point your web browser at a private web server.

Format:

ssh -L <local_port>:<remote_addr>:<remote_port> <server>

If you want to access something on the remote server itself, use localhost as the remote_addr

Examples

Port forward a postgres database running on the remote:

ssh -L 5432:localhost:5432 myuser@myserver

Access a private database from an admin host:

ssh -L 5432:database.rds.amazonaws.com:5432 myuser@admin-host

Remote Port Forwarding

Format:

[Read More]

Ocaml Memory Model

Non-Atomic Variables

  var1: [t1 -> v1; t2 -> v2]

where var1 is the name of the variable, tx are timestamps, and vx are the values of the variable at those timestamps.

Note that t(n+1) must be greater than t(n)

Domains

Domains are separate spheres of execution. Each thread would have their own Domain, for instance.

Frontier

Domains have a frontier, which establishes which variables it can see at which timestamp.

  d1: [var1 -> t1; var2 -> t3; var3 -> t7]

where d1 is the name of the domain, varx are variable names, and tx are timestamps

[Read More]

Unification Algorithm

Unification Algorithm

    type term =
    | Var of string
    | Term of string * term list

You either have a type variable with a name, or a type constructor with a name and a list of argument

Unification takes a list of term pairs which have to be made matching.

Unification returns a list of substitutions, where a substitution is a pair of a string and a term, aka the variable name that should be substituted with the term.

Steps for unifying two terms

Try to match

[Read More]

CSS Tweaks

Add these to the “My Filters” section of uBlock Origin to activate them.

Dark Hacker News

! Title: Dracula HN theme
  news.ycombinator.com##body, .c00:style(color: #CCCCCC !important; background-color: #282835 !important; )
  news.ycombinator.com##tr,td:style(background-color: #282835 !important; )
  news.ycombinator.com##tr#pagespace:style(display: none !important; )
  news.ycombinator.com###hnmain > tbody > tr:nth-child(1) table:style(background-color: #444757 !important; border-bottom: 10px solid #282835 !important; )
  news.ycombinator.com###hnmain > tbody > tr:nth-child(1) td:style(background-color: #444757 !important; )
  news.ycombinator.com##b.hnname > a:style(color: #a4fa90 !important; )
  news.ycombinator.com##a:style(color: #ad96e4 !important; )
  news.ycombinator.com##.subline:style(color: #ccc !important; )
  news.ycombinator.com##.subline a:style(color: #999 !important; )
  news.ycombinator.com##.score,#hnmain > tbody > tr:nth-child(1) td:last-child > span.pagetop:style(color: #e1772c !important; )
  news.ycombinator.com##.sitestr:style(color: #a7d3e6 !important; )
Tags: ui