Skip to content

Instantly share code, notes, and snippets.

View vegard's full-sized avatar

Vegard Nossum vegard

View GitHub Profile
@vegard
vegard / quantize-tikz.cc
Created April 15, 2020 11:34
Float to byte quantisation
#if 0
(g++-9 $0 || g++ $0) && \
./a.out > output.tex && \
pdflatex output && \
exec convert -density 400 -flatten output.pdf -resize 25% output.png
exit 1
#endif
#include <cmath>
#include <cstdio>
@vegard
vegard / gist:96918be888ef0a583ebd45fbd5cf5e97
Created August 30, 2020 12:21
You must not sleep - Arnulf Øverland, 1937
You must not sleep
Arnulf Øverland, 1937
I woke up one night from a strange dream,
it was like a voice spoke to me,
far away like an underground current -
and I sat up: What do you want with me?
- You must not sleep! You must not sleep!
@vegard
vegard / kernel-dev.md
Last active May 3, 2024 04:55
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.