Skip to content

Instantly share code, notes, and snippets.

@gmarull
gmarull / example-tex2svg.py
Last active October 25, 2025 13:12
Render TeX to SVG in Python using matplotlib and display with PyQt
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtSvg import QSvgWidget
from io import BytesIO
import matplotlib.pyplot as plt
# matplotlib: force computer modern font set
plt.rc('mathtext', fontset='cm')
@tomix86
tomix86 / ambient.c
Last active February 19, 2024 09:05 — forked from infinity0/ambient.c
Set ambient capabilities
/*
* Test program for the ambient capabilities
*
* You need to install libcap-ng-dev first, then compile using:
* $ gcc -o ambient ambient.c -lcap-ng && sudo setcap cap_setpcap,cap_net_raw,cap_net_admin,cap_sys_nice+eip ambient
*
* To get a shell with additional caps that can be inherited do:
*
* ./ambient /bin/bash
*/
@willurd
willurd / web-servers.md
Last active October 26, 2025 20:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jbroadway
jbroadway / Slimdown.md
Last active August 20, 2025 13:12
Slimdown - A simple regex-based Markdown parser.