Skip to content

Instantly share code, notes, and snippets.

@nrninsane
nrninsane / karabiner.json
Last active July 5, 2021 07:53
karabiner-config
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@nrninsane
nrninsane / declarations.md
Last active June 16, 2021 15:26
declarations

What are tests for? Tests are for declaring how implementations should behave.

Should we then test that which is declared? Yes.

But then you're declaring how a declaration should behave, no? Only if you test the declaration by itself. If you test the integration of the declaration, then you're testing an implementation.

@nrninsane
nrninsane / properties.md
Last active June 10, 2021 07:24
Simple, yet complicated code

Simple, yet complicated code

Code has many forms.

Many are hard to follow. Some are easy to follow. Many change a lot as you go deeper. Some change little as you go deeper.

Many have a form which we consider as ugly.

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from http://mxcl.github.io/homebrew/

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

to find where for example ls is defined, use

zsh -ixc : 2>&1 | grep "alias 'ls="
@nrninsane
nrninsane / machine.js
Last active July 6, 2020 10:01
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

Note: only rebase local branches, NEVER REBASE A REMOTE BRANCH.

  1. create backup to preserve original commit tree
git branch myBackup
  1. get list of commits and their SHA
git --no-pager log --oneline