Skip to content

Instantly share code, notes, and snippets.

@jcaesar
jcaesar / .envrc
Last active February 17, 2024 06:47
rust-nix-musl-dyn
use flake
@jcaesar
jcaesar / .gitignore
Last active December 3, 2023 11:33
a
result
*.bsp
/target
/Cargo.lock
@jcaesar
jcaesar / .SRCINFO
Last active March 11, 2023 13:50
prometheus-node-exporter-rapl-cfg
pkgbase = prometheus-node-exporter-rapl-cfg
pkgdesc = powercap group and read access for intel_rapl_common /sys files
pkgver = 0.1.0
pkgrel = 1
arch = any
license = Apache
makedepends = rust
source = modules-load.d
source = prometheus-node-exporter.d
source = sysusers
@jcaesar
jcaesar / .gitignore
Last active October 6, 2022 13:35
By the grace of Lord dtolnay
/target
@jcaesar
jcaesar / trace.py
Last active April 7, 2022 08:22
Snippet to paste before your python code to get a call graph
# Place at the head of your main file
import sys
import atexit
def function_identifier(frame):
code = frame.f_code
name = code.co_name
file = code.co_filename
return "{}:{}".format(file, name)
#!/usr/bin/env bash
set -euxo pipefail
kernelver="$(pacman -Qi linux-ec2 | grep Version)"
paccache -r
pacman -Syu --noconfirm
if test "$(( $(date +%s) / 86400 % 14 ))" -eq 0 || test "$(pacman -Qi linux-ec2 | grep Version)" != "$kernelver"; then
@jcaesar
jcaesar / .gitignore
Last active March 2, 2022 10:01
Repro
/target
@jcaesar
jcaesar / .gitignore
Last active March 2, 2022 09:59
Repro
/target
#!/usr/bin/env bash
set -euo pipefail
df='
FROM docker.io/library/debian:bullseye
RUN dpkg --add-architecture armhf && \
apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get install -yq \