Skip to content

Instantly share code, notes, and snippets.

View analytic-bias's full-sized avatar
🏴
Shipping criminals against informatics to the Hague

Hypatia du Bois-Marie 形式科學為人權 中共下台 analytic-bias

🏴
Shipping criminals against informatics to the Hague
View GitHub Profile
@analytic-bias
analytic-bias / embed_video.tex
Created April 2, 2025 04:46 — forked from FedericoTartarini/embed_video.tex
Embed a video into LaTeX wihout using Flash
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% this code was copied from https://tex.stackexchange.com/a/516102
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[bigfiles]{pdfbase}
\ExplSyntaxOn
\NewDocumentCommand\embedvideo{smm}{
\group_begin:
\leavevmode
\tl_if_exist:cTF{file_\file_mdfive_hash:n{#3}}{
@kobataiwan
kobataiwan / system-sleep-xhci.sh
Last active August 26, 2024 07:08 — forked from timrs2998/system-sleep-xhci.sh
Disable broken xhci device before suspend and avoid freeze.
#!/bin/sh
#
# This script should prevent the following suspend errors
# which freezes the Dell Inspiron laptop.
#
# Put it in /usr/lib/systemd/system-sleep/xhci.sh
#
# The PCI 00:14.0 device is the usb xhci controller.
#
# kernel: [67445.560610] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
@LukeZGD
LukeZGD / ios-downgrade-dualboot.md
Last active July 31, 2025 12:15
Downgrade and dualboot status of almost all iOS devices

Downgrade and dualboot status of almost all iOS devices

UPDATED: 2025-07-01

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Juul
Juul / book_scanning_guide.md
Created July 13, 2019 22:07
Guide on book scanning using camera-based scanner like the one at noisebridge

Today I went to noisebridge and scanned Wonders Through the Microscope and it is now available for download on the freestore! I will likely also generate a color version of the PDF but the book is in black and white so it really doesn't add much.

This is my first attempt at book scanning and post-processing using only open source tools so I thought I'd share this book scanning guide based on my experiences :)

Scan

I used the noisebridge book scanner hardware and their python script which remote-controls two DSLR cameras and downloads the photos over USB. It worked very well.

Note that in addition to gphoto2 you will also need jpegtran. This command will get you both:

@nornagon
nornagon / 1-intro.md
Last active November 17, 2024 22:16
How to make a Minecraft (1.8) mod

How to make a Minecraft mod

Minecraft mods, especially mods which change the client, are by and large written with Forge. If you visit their website, you'll be greeted abruptly by a mysterious message at the top of an SMF forum, with no clear path towards actually... making a mod. I'm documenting here the steps I went through to get started, in the hopes of helping the next person have an easier time of it.

I'll be using Scala for this guide, but it should be fairly easy to adapt these instructions to any JVM language (e.g. clojure or if you're feeling masochistic, Java). I'm also developing on OS X, so some of the commands will be a little different if you're on Linux or Windows. I'm assuming you have some proficiency with your operating system, so I won't go into details about how to adapt those commands to your system.

Background

Minecraft doesn't have an official mod API (despite early [promises](http://notch.t

@CMCDragonkai
CMCDragonkai / demonstrating_monomorphism_restriction.md
Last active January 8, 2024 16:42
Demonstrating Monomorphism Restriction #haskell

By default GHCi has NoMonomorphismRestriction, whereas GHC has MonomorphismRestriction. Furthermore GHCi does not load the extensions of the modules that it loads. All of this can be changed with the LANGUAGE pragma or by setting the extensions inside the GHCi shell.

NoMonomorphismRestriction generally means that GHCi will try to infer the most polymorphic types and type signatures possible. While MonomorphismRestriction means GHC will try to infer the most monomorphic types and type signatures possible. An interesting

@CMCDragonkai
CMCDragonkai / higher_kinded_types_in_rust_and_haskell.md
Last active May 13, 2025 10:19
Rust/Haskell: Higher-Kinded Types (HKT)

Rust/Haskell: Higher-Kinded Types (HKT)

A higher kinded type is a concept that reifies a type constructor as an actual type.

A type constructor can be thought of in these analogies:

  • like a function in the type universe
  • as a type with a "hole" in it
@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active July 25, 2025 07:24
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@vertexclique
vertexclique / cracking.md
Last active July 25, 2025 07:22
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text