Skip to content

Instantly share code, notes, and snippets.

View Pangoraw's full-sized avatar
🔧
tuning

Paul Berg Pangoraw

🔧
tuning
View GitHub Profile
@oxinabox
oxinabox / example.jl
Last active February 6, 2025 16:58
Running the Julia Compiler pipeline manually
#Helpers:
"Given some IR generates a MethodInstance suitable for passing to infer_ir!, if you don't already have one with the right argument types"
function get_toplevel_mi_from_ir(ir, _module::Module)
mi = ccall(:jl_new_method_instance_uninit, Ref{Core.MethodInstance}, ());
mi.specTypes = Tuple{ir.argtypes...}
mi.def = _module
return mi
end
"run type inference and constant propagation on the ir"
@Pangoraw
Pangoraw / pdf_zotero.sh
Last active January 6, 2025 13:12
Open zotero files from a selector like rofi, dmenu, fzf,...
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
ZOTERO_DIR="$HOME/snap/zotero-snap/common/Zotero"
ZOTERO_DB="${ZOTERO_DIR}/zotero.sqlite"
PDF_READER="$HOME/Projects/piz/target/debug/piz"
@Pangoraw
Pangoraw / download_zotero.py
Last active January 6, 2025 13:13
Download articles from the web when zotero has not synced them.
#!python
"""
Downloads Zotero files that are not synced on this laptop.
"""
import os
from pathlib import Path
import argparse
import sqlite3