Skip to content

Instantly share code, notes, and snippets.

@LdBeth
LdBeth / build.org
Last active June 19, 2025 18:06
Build Emacs 31 for Windows

Build Emacs with MSYS2

This document is an up-to-date guide on compile Emacs 31 on windows with MSYS2, and make a installation with native compile that can work without MSYS2.

The idea is after get a working Emacs, you may delete MSYS2 environment to free some disk space, and forget about rebuilding Emacs

@MattPD
MattPD / cpp.std.modules.draft.md
Last active January 6, 2025 04:36
C++ links: Modules (WIP draft)
@MattPD
MattPD / correctness.industry.draft.md
Last active June 10, 2025 22:39
Correctness in Practice: Formal Methods and Program Analysis in Industry
@MattPD
MattPD / cpp.std.coroutines.draft.md
Last active June 16, 2025 20:22
C++ links: Coroutines (WIP draft)
exit # Dont run this as a script
# LLVM seems to work great on Musl, there only seems some build errors
# when trying to build the sanitizers. So sanitizers have been disabled.
# This is rougly based on this:
# https://wiki.musl-libc.org/building-llvm.html
# But updated for LLVM 8
# We are also focusing on making a GNU-less toolchain, as there is
# no libgcc and no libstdc++, instead we favor LLVM's own compiler-rt
@bogdan-kulynych
bogdan-kulynych / install-cuda-10-bionic.sh
Last active October 17, 2024 23:17
Install CUDA 10 on Ubuntu 18.04
# WARNING: These steps seem to not work anymore!
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
@jtpio
jtpio / ast_visitor_template.py
Last active April 15, 2024 10:31
Template for visiting all Python AST nodes
"""
All the methods were generated based on the list of nodes from the
"Green Tree Snakes" guide:
https://greentreesnakes.readthedocs.io/en/latest/index.html
"""
import ast
class Visitor(ast.NodeVisitor):
@steven2358
steven2358 / ffmpeg.md
Last active June 10, 2025 19:47
FFmpeg cheat sheet
@mbinna
mbinna / effective_modern_cmake.md
Last active June 18, 2025 08:43
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft