Skip to content

Instantly share code, notes, and snippets.

@mdmarek
mdmarek / YouTubeMusic
Last active October 29, 2023 18:06
Links to music on YouTube
Classic
https://www.youtube.com/watch?v=xtLoaMfinbU Tchaikovsky, The Nutcracker
https://www.youtube.com/watch?v=7w7vIQe4HU0 Ravel, Piano Concerto for the Left Hand
https://www.youtube.com/watch?v=T5oVgqIbOqw Ravel, Ma mère l'oye
https://www.youtube.com/watch?v=ydKwY0tqAXQ Beethoven, Sonata Claro de Luna
https://www.youtube.com/watch?v=t3217H8JppI Beethoven, Symphony No. 9
https://www.youtube.com/watch?v=arMu4f8rnBk Beethoven, Moonlight Sonata
https://www.youtube.com/watch?v=CMc00D8J7i4 Beethoven, Para Elisa
https://www.youtube.com/watch?v=eqksy-991sI Georg Friedrich Handel, Concerti Grossi Op 6
https://www.youtube.com/watch?v=DxtAHpYIXdU Dvořák, String Quartet No. 12 in F major, Op. 96 American
@mdmarek
mdmarek / riscv.md
Created March 2, 2023 19:58 — forked from cb372/riscv.md
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.

@mdmarek
mdmarek / WaiApp3.hs
Created May 13, 2012 22:06
Haskell web application to serve static files.
{-# LANGUAGE OverloadedStrings #-}
-- | Wai+Warp file server. Used GHC 7.4, Wai 1.1, Warp 1.1 versions.
module Main where
import Network.Wai.Handler.Warp (run)
import Network.Wai.Application.Static
( StaticSettings(..)
, staticApp
, fileSystemLookup
@mdmarek
mdmarek / PDFs
Last active January 22, 2018 16:11
Links to Papers in Comp Sci, Bio Sci, etc
Comp Sci (Leslie Lamport)
http://research.microsoft.com/en-us/um/people/lamport/pubs/state-machine.pdf
Comp Sci (Stats & ML)
http://jmlr.org/papers/volume9/vandermaaten08a/vandermaaten08a.pdf
http://martin.zinkevich.org/rules_of_ml/rules_of_ml.pdf
https://arxiv.org/pdf/1611.07004.pdf
https://arxiv.org/pdf/1703.01619.pdf
https://cdn1.sph.harvard.edu/wp-content/uploads/sites/1268/2017/03/hernanrobins_v1.10.32.pdf
https://cdn1.sph.harvard.edu/wp-content/uploads/sites/1268/2017/03/hernanrobins_v2.17.17.pdf
@mdmarek
mdmarek / Links
Last active January 22, 2018 16:10
Links (non PDF)
@mdmarek
mdmarek / Film
Created June 9, 2017 20:42
Films to watch
There Will Be Blood
Spirited Away
Million Dollar Baby
A Touch of Sin
The Death of Mr. Lazarescu
Yi Yi
Inside Out
Boyhood
Summer Hours
The Hurt Locker
@mdmarek
mdmarek / paxos.txt
Created March 22, 2017 18:40
Paxos in 25 lines
--- Paxos Proposer ---
1 proposer(v):
2 while not decided:
2 choose n, unique and higher than any n seen so far
3 send prepare(n) to all servers including self
4 if prepare_ok(n, na, va) from majority:
5 v' = va with highest na; choose own v otherwise
6 send accept(n, v') to all
@mdmarek
mdmarek / pprof-in-gcloud
Created December 24, 2016 06:25
Profiling Go Processes in Google Cloud
gcloud compute copy-files --zone <zone> <host>:<path>/<binary> /tmp/<binary>.sym
gcloud compute ssh --zone <zone> <host> --ssh-flag="-L <port>:localhost:<port>" --ssh-flag="-N" --ssh-flag="-n"
go tool pprof -lines /tmp/<binary>.sym http://localhost:<port>/debug/pprof/heap
@mdmarek
mdmarek / OneBitClock.cfg
Created November 3, 2016 16:18
TLA+ One Bit Clock
INIT
Init
NEXT
Next
INVARIANT
TypeOK
@mdmarek
mdmarek / HourClock.cfg
Created November 3, 2016 16:17
TLA+ Hour Clock
INIT
Init
NEXT
Next