Skip to content

Instantly share code, notes, and snippets.

View 3dgoose's full-sized avatar
📢
Honk Honk

Adam Ellouze 3dgoose

📢
Honk Honk
View GitHub Profile
@3dgoose
3dgoose / rng.c
Last active March 23, 2025 15:19
Sample RNG rolling with a map
#include <stdio.h>
#include <stdlib.h>
// Define the number of orbs
#define NUM_ORBS 11
// Map dimensions
#define MAP_WIDTH 10
#define MAP_HEIGHT 5
@3dgoose
3dgoose / Makefile
Created February 13, 2025 08:30
Makefile for cc65
CC = /usr/bin/cc65
CA = /usr/bin/ca65
CL = /usr/bin/cl65
all:
$(CC) main.c
$(CA) main.s
$(CL) main.o
clean:
@3dgoose
3dgoose / joe-is-sick.py
Created January 19, 2025 10:18
Joe is sick
# Joe is sick v1
name = str(input("What's your name ?"))
print(f"Program : {name} ! {name} !")
print("Program : It's Joe ! He's sick !")
print(f"{name} : Who's Joe")
print("Program : Joe Mama")
print(f"{name} : What ?")
@3dgoose
3dgoose / hexalphabet.sh
Created December 16, 2024 19:43
ASCII to HEX alphabet and numbers
#!/bin/bash
echo "ASCII to HEX alphabet"
letters () {
A=0x41
B=0x42
C=0x43
D=0x44
E=0x45
#!/bin/bash
git add .
# Commit Message
commmitMsg=$(gum input --placeholder="Commit message")
git commit -S -m "$commmitMsg"
git push
@3dgoose
3dgoose / sim.py
Created August 15, 2024 17:02
A simulation where my sister steals money every 2 weeks.
# Initialisation
argent = 20
semaine = 0
# Boucle de simulation
while True:
# Grand-père donne 10 $
argent += 10
# Soeur vole 3 $
@3dgoose
3dgoose / colors.c
Created August 10, 2024 20:53
Print with colors in a terminal, snippet in Airlib.
#include <stdio.h>
#define KNRM "\x1B[0m"
#define KRED "\x1B[31m"
#define KGRN "\x1B[32m"
#define KYEL "\x1B[33m"
#define KBLU "\x1B[34m"
#define KMAG "\x1B[35m"
#define KCYN "\x1B[36m"
#define KWHT "\x1B[37m"
@3dgoose
3dgoose / serialcomic.py
Last active August 3, 2024 14:24
A Comic Library management system for Pico.
# serialcomic.py
import machine
import os
def add():
title = input("Enter comic title: ")
uid = input("Enter UID: ")
issn = input("Enter ISSN: ")
release_date = input("Enter release date: ")
from machine import Pin
import time
import math
memory = {}
print("MPY CALCULATING TERMINAL")
def calculate(expression):
try:
@3dgoose
3dgoose / sysinfo.py
Last active June 28, 2024 20:15
Get SysInfo in Python
import psutil
import os
import subprocess
def get_cpu_temp():
temp = psutil.sensors_temperatures()['cpu_thermal'][0].current
return temp
ip = "hostname -I"
uptime = "uptime -p"