Skip to content

Instantly share code, notes, and snippets.

@Maix0
Maix0 / README.md
Last active April 15, 2025 15:05
Symdiff - print which functions are present in a binary, but not declared (no code) in objects files

How to use this:

  • Download the symdiff.py file
  • set it up next to your makefile with executable permission (chmod +x ./symdiff.py)
  • add (and modify) the makefile rule created by ./symdiff.py --makefile
  • run make symdiff
  • voila :)

Simple questions:

I have weird symbols in cyan that are named like _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_

@Maix0
Maix0 / writer-souls.sh
Last active October 9, 2024 20:17
Check your writer souls status
#!/bin/sh
export PAGE_END=3
export USER_ID
if [ -f ./.env ]; then
echo "Sourced .env"
. ./.env
fi
export TOKEN
@Maix0
Maix0 / install-usr-nix
Last active May 22, 2025 13:57
Install nix on 42's pc
#!/usr/bin/env bash
BASE_DIR="$HOME/.local/share/usr-nix"
create_file() {
out="$1"
if mkdir -p "$(dirname "$out")"; then
true
else
echo -e "\x1b[31m$out installation failed with code $?\x1b[0m"
@Maix0
Maix0 / launch-nix
Last active June 25, 2024 14:58
Launch nix on 42's pc
#!/usr/bin/env bash
ADDITIONAL_BINDS= #"--bind $HOME /home/maix"
RUN_BWRAP="/usr/bin/bwrap --bind $(mktemp -d) / --dev-bind /dev /dev --bind $HOME/nix-location /nix --bind /usr/lib32 /lib32 --bind /usr/libx32 /libx32 --bind /osquery.flags /osquery.flags --bind /usr/lib64 /lib64 --bind /media /media --bind /root /root --bind /sgoinfre /sgoinfre --bind /.cache /.cache --bind /var /var --bind /sys /sys --bind /usr/sbin /sbin --bind /boot /boot --bind /snap /snap --bind /usr/bin /bin --bind /tmp /tmp --bind /opt /opt --bind /lost+found /lost+found --bind /usr /usr --bind /home /home --bind /usr/lib /lib --bind /run /run --bind /proc /proc --bind /mnt /mnt --bind /swap.img /swap.img --bind /etc /etc --bind /goinfre /goinfre --bind /srv /srv --bind /etc/host.conf /etc/host.conf --bind /etc/hosts /etc/hosts --bind /etc/networks /etc/networks --bind /etc/passwd /etc/passwd --bind /etc/group /etc/group --bind /etc/nsswitch.conf /etc/nsswitch.conf --bind /run/systemd/resolve/stub-resolv.conf /run/systemd/resolve/stub-
use wgpu::util::DeviceExt;
pub struct GpuVector<T: bytemuck::Pod> {
buffer: wgpu::Buffer,
gpu_len: usize,
cache: Vec<T>,
usage: wgpu::BufferUsages,
needs_resize: bool,
}