Skip to content

Instantly share code, notes, and snippets.

View Determinant's full-sized avatar
🛩️
Focusing

Ted Yin Determinant

🛩️
Focusing
View GitHub Profile
@Determinant
Determinant / gist:dd0f26436c8ef8c530e5d64937752753
Last active September 26, 2017 18:50 — forked from dvliman/gist:267b66ac3a321172fd35
linux-kernel-booting-process

GNU/Linux kernel internals

Linux kernel booting process. Part 1.

If you read my previous blog posts, you can note that sometime ago I have started to get involved low-level programming. I wrote some posts about x86_64 assembly programming for Linux. In the same time I started to dive into GNU/Linux kernel source code. It is very interesting for me to understand how low-level things works, how programs runs on my computer, how they located in memory, how kernel manages processes and memory, how network stack works on low-level and many many other things. I decided to write yet another series of posts about GNU/Linux kernel for x86_64.

Note, that I'm not professional kernel hacker and I don't write code for kernel at work, just a hobby. I just like low-level stuff and it is interesting to me how these

#include <cstdio>
#include <thread>
#include <vector>
#include <mutex>
#include <atomic>
#include <condition_variable>
#include <unistd.h>
std::atomic<bool> processing;
@Determinant
Determinant / simple_spec.c
Last active October 28, 2019 09:09
Simple Spec -- A Simple Discrete-time STFT Program.
#include <math.h>
#include <sndfile.h>
#include <string.h>
#include <assert.h>
#include <getopt.h>
#define PI 3.141592653589793
#define EPS 1e-8
#define MAX_BIN_NUM 65536
/* SHIFT_NUM should be less than or equal to BIN_NUM */
@Determinant
Determinant / p-dump.patch
Last active January 20, 2021 00:16
p-dump.patch
diff --git a/vms/platformvm/reward_validator_tx.go b/vms/platformvm/reward_validator_tx.go
index 58e2426c..ae21d7f0 100644
--- a/vms/platformvm/reward_validator_tx.go
+++ b/vms/platformvm/reward_validator_tx.go
@@ -14,6 +14,7 @@ import (
"github.com/ava-labs/avalanchego/utils/constants"
"github.com/ava-labs/avalanchego/vms/components/avax"
"github.com/ava-labs/avalanchego/vms/components/verify"
+ "github.com/ava-labs/avalanchego/vms/secp256k1fx"
@Determinant
Determinant / fft.c
Created July 11, 2014 13:55
Direct DFT and Cooley–Tukey FFT Algorithm C Implementation
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct Comp {
/* comp of the form: a + bi */
double a, b;
} Comp;
@Determinant
Determinant / xim_example.c
Last active October 9, 2023 13:54
A minimal example for X Input Method.
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
#include <assert.h>
Display *dpy;
Window win;