Skip to content

Instantly share code, notes, and snippets.

View m-rey's full-sized avatar
🏳️‍⚧️
Hack the planet!

Mæve Rey m-rey

🏳️‍⚧️
Hack the planet!
  • Nuremberg, Germany
View GitHub Profile
@HaleTom
HaleTom / aria2-trackers-update
Last active June 19, 2025 14:43
Update aria2.conf with 20 "best" BitTorrent trackers
#!/bin/bash
# Update the bt-tracker= line in aria2.conf
# Any bt-tracker= lines are removed and and a new one added at the bottom of the file
# Updates at: https://gist.github.com/HaleTom/fe873dc2f3c5bd14f7418efefc2b91a8
# Inspiration: https://github.com/wuyuansushen/aria2c_TrackersList
set -euo pipefail
shopt -s failglob
@raxityo
raxityo / DrawSparkline.js
Last active July 10, 2023 14:54
Draw Sparkline chart, converted by ChatGPT from https://alexplescan.com/posts/2023/07/08/easy-svg-sparklines/
// Define the default fill and stroke colors
const defaultFill = "#dcfce7";
const defaultStroke = "#bbf7d0";
// Define the stroke width
const strokeWidth = 4;
/**
* Draws a sparkline SVG based on the given width, height and points
* @param {number} width - The width of the SVG element
#include <stdio.h>
#include <stdint.h>
// Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc
uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo
{
while(len--)
{
crc ^= *buffer++ << 8;
int bits = 0;
do
@yzdbg
yzdbg / auto-dr.md
Last active November 3, 2023 17:11

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@hyperupcall
hyperupcall / settings.jsonc
Last active June 26, 2025 09:47
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@andre-st
andre-st / backup-reinstall.sh
Last active January 13, 2024 16:44
Script creates udev and systemd configuration files for my auto-starting backup system. Beware: backup program is missing here!
#!/usr/bin/env bash
##############################################################################
#
# Manual configuration:
#
readonly IS_TEST=false
readonly CRYPTNAME=cryptback
readonly SOURCE_DIR=/mnt/data
readonly BACKUP_DIR=/mnt/backup
@solarkraft
solarkraft / syncthing-automerge.py
Last active August 20, 2025 12:28
Monitors a Syncthing-synced directory and tries to merge conflicting files (based on https://www.rafa.ee/articles/resolve-syncthing-conflicts-using-three-way-merge/). Probably adaptable for other directory types, but only tested with Logseq (works for me™️).
# This script automatically handles Syncthing conflicts on text files by applying a
# git three-way merge between the previously synced version and each divergent version.
# It depends on the watchdog package and git.
# For automatic dependency installation when running with ´uv run --script deconflicter.py´:
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "watchdog",
@Gaelan
Gaelan / README.md
Last active June 18, 2025 09:27
ChatGPT passes the 2022 APCSA free response section

ChatGPT passes the 2022 AP Computer Science A free response section

For fun, I had ChatGPT take the free response section of the 2022 AP Computer Science A exam. (The exam also has a multiple-choice section, but the College Board doesn't publish this.) It scored 32/36.

Methodology

  • For each question, I pasted in the full text of the question and took the response given.
  • I tried each question once and took the response given: no cherry-picking. For readability, I've added indentation in some cases, and included method signatures where they were provided in the question and ChatGPT only provided a body. I've added question numbers; any other comments are ChatGPT's.
  • Many questions have examples containing tables or diagrams; because those don't translate well to plain text, I excluded those tables/diagrams and any text that referenced them.
  • I excluded the initial instructions at the top of th
@aeongdesu
aeongdesu / awesome-osu.md
Last active December 30, 2024 16:26
awesome osu projects