This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <sys/ioctl.h> | |
#include <sys/syscall.h> | |
#include <sys/mman.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <linux/nvme_ioctl.h> | |
#include <liburing.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://klyr.github.io/posts/playing_with_ubpf/ | |
// clang -target bpf -I/usr/include/x86_64-linux-gnu -O2 -g -c double.bpf.c -o double.bpf.o | |
static int idouble(int a) { | |
return (a * 2); | |
} | |
int bpf_prog(void *ctx) { | |
int a = *(int *)ctx; | |
a = idouble(a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: UTF-8 -*- | |
# obsidian notes -> jekyll posts | |
# | |
# python obsidian_to_jekyll.py --help | |
# python obsidian_to_jekyll.py -w -c -p | |
# python obsidian_to_jekyll.py --print | |
import argparse | |
import os | |
import pathlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include "pin.H" | |
using std::cerr; | |
using std::ofstream; | |
using std::ios; | |
using std::string; | |
using std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"terminal.integrated.profiles.windows": { | |
"Visual Studio PowerShell": { | |
"source": "PowerShell", | |
"icon": "terminal-powershell", | |
"args": [ | |
"-noe", | |
"-c", | |
"&{Import-Module 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll';Enter-VsDevShell 2eff9869 -DevCmdArguments '-arch=x64 -no_logo' -StartInPath ${workspaceFolder}}" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// apt install libipmctl-dev | |
// gcc -o nvdimm_counter nvdimm_counter.c -lipmctl | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
// libipmctl includes | |
#include <nvm_types.h> | |
#include <nvm_management.h> | |
#include <export_api.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"container/list" | |
"fmt" | |
"hash/fnv" | |
"math/rand" | |
"os" | |
"strconv" |