Skip to content

Instantly share code, notes, and snippets.

View mochji's full-sized avatar

mochji mochji

View GitHub Profile
@mochji
mochji / savesong
Created May 12, 2025 03:11
shitty script i made to download songs from youtube
# usage: savesong https://youtube.com/watch?v=thewatchidhereidk "the song name i guess"
yt-dlp $1 --extract-audio --audio-format=mp3 -o ~/Music/TEMPORARY.mp3
mv ~/Music/TEMPORARY.mp3 "$HOME/Music/$2.mp3"
@mochji
mochji / strformat.c
Last active May 11, 2025 22:30
string formatting code i made like a year ago
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
struct
WriteBuffer {
size_t size;
size_t length;
@mochji
mochji / mas-test.c
Last active November 12, 2024 07:49
testing implementation of a mark-and-sweep garbage collector in a similar environment to crescent
#include <stdio.h>
#include <stddef.h>
#define TYPE_NIL 0
#define TYPE_BOOLEAN 1
#define TYPE_INTEGER 2
#define TYPE_FLOAT 3
#define TYPE_STRING 8
#define TYPE_THREAD 9