Skip to content

Instantly share code, notes, and snippets.

View pointbazaar's full-sized avatar
🌳
OCP Inspired

Alexander pointbazaar

🌳
OCP Inspired
View GitHub Profile
@NickSeagull
NickSeagull / ubuntu-bloat-removal.sh
Last active August 27, 2025 14:29
Updated Jan 22nd, 2024 - Simple command to remove all "bloatware" from ubuntu
sudo apt-get remove \
aisleriot \
brltty \
duplicity \
empathy \
empathy-common \
example-content \
gnome-accessibility-themes \
gnome-contacts \
gnome-mahjongg \
@JamesDunne
JamesDunne / i2c.c
Last active October 12, 2025 08:08
C library for reading/writing I2C slave device registers from Raspberry Pi 1 Model B
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
// Terrible portability hack between arm-linux-gnueabihf-gcc on Mac OS X and native gcc on raspbian.
#ifndef I2C_M_RD
#include <linux/i2c.h>
#endif
@leommoore
leommoore / systemd_services.md
Last active April 25, 2024 02:46
Systemd Services 101

Check that your system supports systemd

pidof systemd
2733

If this return a number then your system supports systemd. Most Linux distributions in 2017 support systemd.

Check out the proceses currently running.

Since systemd starts the process then all processes will be children of systemd

@Miouyouyou
Miouyouyou / drm-prime-dumb-kms.c
Last active October 25, 2024 06:17
Simple example showing how to use DRM to : allocate a Dumb buffer on the GPU, use it as a framebuffer, use this CRTC on the currently connected screen (expecting 1 connected screen), export the buffer, reimport it implicitly with mmap and write in it.
// This will works on Embedded GPU that implements .gem_prime_mmap like Rockchip ones.
// This will fail on most DRM drivers for GPU with dedicated memory as they tend to NOT implement .gem_prime_mmap.
#include <stdio.h>
#include <libdrm/drm.h>
#include <stdint.h>
#include <sys/mman.h>
#include <string.h>
@sylv-io
sylv-io / gen_symbol_offsets.py
Created October 25, 2022 23:30
Convert EDK2 OVMF console log to a GDB script that adds symbol information (add-symbol-file)
#!/usr/bin/env python
import argparse
import sys
import os
import pefile
build_dir='Build/OvmfX64/DEBUG_GCC5/X64'
def parse_flags()->argparse.Namespace: