Skip to content

Instantly share code, notes, and snippets.

View coolreader18's full-sized avatar

Noa coolreader18

View GitHub Profile
scopeName: source.par
patterns:
- include: "#decl"
- include: "#def"
- include: "#typedef"
- include: "#let"
- include: "#keywords"
- include: "#comments"
- include: "#literals"
- include: "#function-calls"
@coolreader18
coolreader18 / PUZ_FileFormat.md
Last active August 16, 2025 21:25
Detailed `puz` file format documentation

Originally taken from FileFormat.wiki from the puz project.

Introduction

PUZ is a file format commonly used by commercial software for crossword puzzles. There is, to our knowledge, no documentation of the format available online. This page (and the implementations) is the result of a bit of reverse engineering work.

@coolreader18
coolreader18 / segfault.py
Last active August 12, 2025 17:18
CPython segfault in 5 lines of code
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
a().throw(E)
@coolreader18
coolreader18 / pia_portforward_qbittorent.ps1
Created June 24, 2025 15:02
Set the qBittorent incoming port to the port forwarded by PIA VPN
$Uri = "http://localhost:6969"
$piactl = 'C:\Program Files\Private Internet Access\piactl.exe'
& $piactl monitor portforward | ForEach-Object {
try {
$Port = [int]$_
} catch {
return
}
$Body = @{ json = ConvertTo-Json @{ listen_port = $Port } }
@coolreader18
coolreader18 / make-machine-applicable.sh
Last active February 28, 2025 00:54
Make any rustc lint machine-applicable :)
#!/bin/bash
# this is gross
#
# to use, set RUSTC_WORKSPACE_WRAPPER to this file
# useful with `cargo fix` when adding a new lint to your codebase
#
# if you'd like to filter only to specific diagnostics, set the env variable
# MAKE_MACHINE_APPLICABLE_FILTER to a comma-separated list of lint names or error codes
#!/usr/bin/env python3
import PIL.Image
from PIL import ImageSequence
import wand.image
from io import BytesIO, RawIOBase
def gmagik(gif: PIL.Image.Image, out: RawIOBase):
total = gif.n_frames
use rand;
use rand_core;
use rand::Rng;
/*
A C-program for MT19937, with initialization improved 2002/1/26.
Coded by Takuji Nishimura and Makoto Matsumoto.
Before using, initialize the state by using init_genrand(seed)
diff --git a/.SRCINFO b/.SRCINFO
index c8855a5..55afe04 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = anki-official-binary-bundle
pkgdesc = The official binary shipped with the tested versions of the dependent libraries.
- pkgver = 2.1.49
+ pkgver = 2.1.53
pkgrel = 1

Keybase proof

I hereby claim:

  • I am coolreader18 on github.
  • I am coolreader18 (https://keybase.io/coolreader18) on keybase.
  • I have a public key whose fingerprint is B688 D126 43E7 9125 3099 63C3 7F9F 7DB1 768C 59CF

To claim this, I am signing this object:

@coolreader18
coolreader18 / dl_google_solitaire.sh
Last active November 1, 2021 04:48
git clone https://gist.github.com/c1a14e212679dd38927dcb2cf7b5500d google_solitaire && cd google_solitaire && ./dl_google_solitaire.sh
#!/bin/bash
cd "$(dirname "$0")"
wget -B https://www.google.com/logos/fnbx/solitaire/ -x -nH --cut-dirs 3 -i files.txt -nv
mv standalone*.html index.html
rm -rf files.txt dl_google_solitaire.sh .git