Skip to content

Instantly share code, notes, and snippets.

View michaelbernstein's full-sized avatar

Michael Bernstein michaelbernstein

View GitHub Profile
@michaelbernstein
michaelbernstein / LLM.md
Created March 29, 2023 05:19 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@michaelbernstein
michaelbernstein / attributes.rb
Created April 21, 2019 09:57 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@michaelbernstein
michaelbernstein / gist:1afffcd8a0ecd54340b0
Last active December 22, 2015 16:26 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan Developer Preview 2

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat

Distributed Read-Write Mutex in Go

The default Go implementation of sync.RWMutex does not scale well to multiple cores, as all readers contend on the same memory location when they all try to atomically increment it. This gist explores an n-way RWMutex, also known as a "big reader" lock, which gives each CPU core its own RWMutex. Readers take only a read lock local to their core, whereas writers must take all locks in order.