Skip to content

Instantly share code, notes, and snippets.

shaunlebron /
Last active May 22, 2022
Line breaks in markdown
Hello  (<-- two spaces)


shaunlebron /
Last active Mar 16, 2022
Direct3D9 Wrapper DLL

In response to a StackOverflow question:

Overlaying on a 3D fullscreen application

This is code to build a Direct3D wrapper DLL, intercepting all calls to Direct3D interface functions so that you can draw your own objects to display over the game. Just plop the DLL into the same folder as the game's executable, and it should load it as if it were the real d3d9.dll file. It still forwards all calls to the real one in system32, just allows stuff to happen in between. original stackoverflow answer

shaunlebron / angleLerp.js
Created Feb 5, 2014
The best way to interpolate 2D angles
View angleLerp.js
2D Angle Interpolation (shortest distance)
a0 = start angle
a1 = end angle
t = interpolation factor (0.0=start, 1.0=end)
1. Angles do NOT need to be normalized.
shaunlebron /
Last active Nov 16, 2021
Print beautiful articles (with HTML to LaTeX)

Print Beautiful Articles (with HTML to LaTeX)

It’s hard to read long articles on a computer. Printing them with beautiful typesetting helps.

This solution converts the whole article (or selected part) to LaTeX, then opens it for printing (or editing) in Overleaf. You need an account there, but no installs.


Images are included in the LaTeX code, but won’t show up until you upload them individually to Overleaf. Look for the \includegraphics commands which are commented out in the code, and refer here for proper insertion.

shaunlebron /
Last active Sep 1, 2021
why Dynamicland Realtalk isn't open source

Transcribed from an interview with Toby Schachman and Paula Te on The Afrofuturist Podcast:

There's this notion of the open-source movement. There are a lot of things
that we totally resonate with that because it's about understanding how your
technology works. We're totally 100% on board with that.

But then there are other issues with the open-source community, where it's
very internet-based and so open-source ends up benefitting this group of
people who have really strong access to internet and understand how to use
shaunlebron / SketchSystems.spec
Last active Aug 18, 2021
Super Mario 64 controls
View SketchSystems.spec
Super Mario 64 controls
move -> Walking
z -> Crouching
a -> Jumping
b -> Punching
z up -> Standing
shaunlebron / dark_sheets.css
Last active Jul 13, 2021
Google Sheets Dark Mode
View dark_sheets.css
/* invert the table, formula bar, cell editor, and navbar
and dim transparency to soften */
.cell-input.editable {
filter: invert();
opacity: 0.9;
shaunlebron /
Created May 31, 2012
Iterating Combinations

Iterating Combinations

If you're trying to iterate all combinations of k=5 on n=36, this is how you loop through them.

int k = 5;
int n = 36;
int count = 0;
for (int i1=1; i1 &lt;= n-k+1; i1++)
shaunlebron /
Last active Feb 25, 2021
PingThings and Mr. Plotter