Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Given a grep expression, create a graph of occurrences of that expression
# in your code's history.
set -e
expr="$1"
datafile=$(mktemp)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active September 7, 2025 02:24
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Aethaeryn
Aethaeryn / family-tree.txt
Created July 3, 2012 00:21
Lisp Family Tree
A family tree of major Lisps. (Work in progress.)
--------------------------------------------------------------------------------------------
LISP
--------------------------------------------------------------------------------------------
MACLISP | InterLisp || ||
------------------------- | || ||
Emacs | Lisp Machine | ... | ... || Scheme ||
|-----------------------------------|| ||
| Common Lisp || ||
@Kartones
Kartones / postgres-cheatsheet.md
Last active September 7, 2025 07:46
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@developius
developius / README.md
Last active May 20, 2025 11:20
Setup SSH keys for use with GitHub/GitLab/BitBucket etc
@alerque
alerque / kinesis-dvp.json
Last active April 21, 2021 23:36
Kinesis Advantage Programmers Dvorak
[{x:0.4,c:"#373737",t:"#ffffff",g:true,f:1,w:0.5,h:0.6},"\n\n\n\n\n\nEsc",{x:0.09999999999999998,w:0.5,h:0.6},"\n\n\n\n\n\nF1",{x:0.10000000000000009,w:0.5,h:0.6},"\n\n\n\n\n\nF2",{x:0.10000000000000009,w:0.5,h:0.6},"\n\n\n\n\n\nF3",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nF4",{x:0.10000000000000009,w:0.5,h:0.6},"\n\n\n\n\n\nF5",{x:0.10000000000000009,w:0.5,h:0.6},"\n\n\n\n\n\nF6",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nF7",{x:0.10000000000000053,w:0.5,h:0.6},"\n\n\n\n\n\nF8",{x:6.55,w:0.5,h:0.6},"\n\n\n\n\n\nF9",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nF10",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nF11",{x:0.10000000000000142,w:0.5,h:0.6},"\n\n\n\n\n\nF12",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nSys<br>Req",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nScrl<br>Lck",{x:0.10000000000000142,w:0.5,h:0.6},"\n\n\n\n\n\nBreak",{x:0.09999999999999787,w:0.5,h:0.6},"\n\n\n\n\n\nKeypad",{x:0.10000000000000142,w:0.5,h:0.6},"\n\n\n\n\n\nProgram"],
[{y:-0.25,x:2.25,f:3},"{\n5","
@burtonsamograd
burtonsamograd / nock.lisp
Created October 9, 2015 02:48
A Nock Interpreter and Compiler in Common Lisp #Urbit
;; A nock interpreter
(defun tar (a f)
(labels ((fas (b a)
(declare (integer b))
(cond
((= b 1) a)
((= b 2) (car a))
((= b 3) (cdr a))
((evenp b) (car (fas (/ b 2) a)))
((oddp b) (cdr (fas (/ (1- (the integer b)) 2) a))))))
@vasanthk
vasanthk / System Design.md
Last active September 6, 2025 21:59
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@agam
agam / quick-start.lisp
Last active November 2, 2016 22:32
Basic CL quick start in SBCL, using `rutilsx`
;; Step 1: Get the package
(ql:quickload "rutilsx")
;; Step 2: Use it
(use-package :rutilsx)
;; Unfortunately, there is a collision between RUTILS.MISC:VOID and SB-ALIEN:VOID,
;; so select one of the two restarts to continue ...
;; Step 3: Turn on the readtable (for convenient vector/hash literals)
(named-readtables:in-readtable rutilsx-readtable)

Getting Started in Scala

This is my attempt to give Scala newcomers a quick-and-easy rundown to the prerequisite steps they need to a) try Scala, and b) get a standard project up and running on their machine. I'm not going to talk about the language at all; there are plenty of better resources a google search away. This is just focused on the prerequisite tooling and machine setup. I will not be assuming you have any background in JVM languages. So if you're coming from Python, Ruby, JavaScript, Haskell, or anywhere…  I hope to present the information you need without assuming anything.

Disclaimer It has been over a decade since I was new to Scala, and when I was new to Scala, I was coming from a Java and Ruby background. This has probably caused me to unknowingly make some assumptions. Please feel free to call me out in comments/tweets!

One assumption I'm knowingly making is that you're on a Unix-like platform. Sorry, Windows users.

Getting the JVM