Skip to content

Instantly share code, notes, and snippets.

@shuhaowu
shuhaowu / pandoc.css
Last active November 10, 2022 16:43 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@shuhaowu
shuhaowu / glvsync.c
Created June 24, 2020 03:00 — forked from Cloudef/glvsync.c
Force glXSwapInterval* to whatever you want
/* gcc -std=c99 -fPIC -shared -Wl,-soname,glvsync.so glvsync.c -o glvsync.so
* gcc -m32 -std=c99 -fPIC -shared -Wl,-soname,glvsync.so glvsync.c -o glvsync.so (for 32bit)
*
* Force VSYNC interval on OpenGL applications
* Alternatively can also try FPS locking a OpenGL program
* Usage: LD_PRELOAD="/path/to/glvsync.so" ./program
*/
#define _GNU_SOURCE
#include <dlfcn.h>
@shuhaowu
shuhaowu / podman-shell.nix
Created May 24, 2020 23:56 — forked from adisbladis/podman-shell.nix
Use podman within a nix-shell
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };