Skip to content

Instantly share code, notes, and snippets.

View manawardhana's full-sized avatar

Tharaka Manawardhana manawardhana

  • Sydney - Australia
View GitHub Profile
@ecthiender
ecthiender / doom_emacs_for_haskell.md
Last active October 25, 2023 05:33
Step by step instructions to setup doom emacs for Haskell + Haskell Language Server (LSP)

Install doom emacs

git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
cd ~/.emacs.d
bin/doom install

Optional

@onlurking
onlurking / programming-as-theory-building.md
Last active April 19, 2024 22:31
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@gene1wood
gene1wood / how-to-fix-provided-target-groups-may-not-be-valid.md
Created October 18, 2018 14:56
How to fix "Provided Target Groups may not be valid" on AWS CloudFormation stack update

If you

  • Create a CloudFormation template that creates an Auto Scale Group
  • Set the TargetGroupARNs field in the Auto Scale Group to the output from the Target Group's LoadBalancerArns attribute (which is obtained with GetAtt)
  • Do a stack update

You will encounter a stack update failure with the error message Provided Target Groups may not be valid

Instead of using GetAtt of the LoadBalancerArns of the Target Group, use the Ref of the Target Group and put the single resulting ARN into

@jboner
jboner / latency.txt
Last active May 18, 2024 15:58
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD