Skip to content

Instantly share code, notes, and snippets.

View danielchasehooper's full-sized avatar
🤘
.

Daniel Hooper danielchasehooper

🤘
.
View GitHub Profile
@danielchasehooper
danielchasehooper / _miniperf_readme.md
Created July 29, 2025 20:14 — forked from mmozeiko/_miniperf_readme.md
get PMU counter values with ETW, perf or kperf

MiniPerf

Example of how to capture CPU counters with ETW on Windows, perf on Linux or kperf on Apple.

Using ETW needs somewhat recently updated Windows 10 or 11. Not sure about exact version.

Currently tested on:

  • etw on Qualcomm Snapdragon X Elite, Windows 11, arm64
  • etw on AMD Zen 3, Windows 11 (with virtualization enabled in BIOS)
@danielchasehooper
danielchasehooper / inline_shader.js
Created February 4, 2025 20:33
the code that creates the interactive shader editor for danielchasehooper.com
"use strict";
// I'm posting at the request of this lobsters comment: https://lobste.rs/s/ycbpnz/animating_rick_morty_one_pixel_at_time#c_wonfh3
// this code sets up the live shader editor on http://danielchasehooper.com/posts/code-animated-rick/
(function() {
let gl;
let program;
let cached_vertex_shader;
@danielchasehooper
danielchasehooper / count.sh
Created October 23, 2014 21:10
Count the lines of code in the current directory
#!/bin/sh
find . \( -iname "*.[chm]" -o -iname "*.swift" -o -iname "*.cpp" -o -iname "*.mm" \) -print0 | xargs -0 cat | wc -l
@danielchasehooper
danielchasehooper / BlenderAnimationExport.py
Created March 4, 2012 21:13
This is the Blender export script used to export Percepto's animated models
#!BPY
# Blender animation export script by Daniel Hooper
# www.danielhooper.tumblr.com
import bpy
from os.path import basename
import struct
GL_FLOAT = 5126
GL_UNSIGNED_INT = 5125