Skip to content

Instantly share code, notes, and snippets.

@EllieTheYeen
EllieTheYeen / minecraft-crash-client.txt
Created December 15, 2024 21:56
Got this bizarre crash that seems to be related to computercraft
---- Minecraft Crash Report ----
// There are four lights!
Time: 2024-12-15 18:14:54
Description: Rendering Block Entity
java.lang.OutOfMemoryError: Failed to resize buffer from 2146435072 bytes to -2146435072 bytes
at MC//net.minecraft.client.util.GlAllocationUtils.resizeByteBuffer(GlAllocationUtils.java:21)
at MC//net.minecraft.client.render.BufferBuilder.grow(BufferBuilder.java:64)
at MC//net.minecraft.client.render.BufferBuilder.sodium$moveToNextVertex(BufferBuilder.java:5601)
@EllieTheYeen
EllieTheYeen / monitoritems.lua
Created December 13, 2024 23:08
Minecraft ComputerCraft display item counts and changes on a monitor
function seccomparator(a, b)
return a[2] > b[2]
end
function getChanges()
local changes = {}
if pastinv == nil then
return false, changes, {}
end
local changed = false
#!/bin/bash
if [ ${#@} -gt 1 ]; then
TITLE="$1"
BODY="${@:2}"
else
TITLE=""
BODY="$@"
fi
token="$(cat ~/.pushtoken)"
curl \
@EllieTheYeen
EllieTheYeen / envtest.py
Last active October 26, 2024 08:15
Testgist
#!/usr/bin/python3
import os
os.environ["POST"] = 'this is some data here yes probably long and all that meow soft mew'
os.environ["MOST"] = "mew mew mew mew mew commit message"
os.system("./testenv.sh")
@EllieTheYeen
EllieTheYeen / 7segtest.py
Created June 1, 2024 01:35
7 Segment silly test
glyphs = {
"0": 0b11111100,
"1": 0b01100000,
"2": 0b11011010,
"3": 0b11110010,
"4": 0b01100110,
"5": 0b10110110,
"6": 0b10111110,
"7": 0b11100000,
"8": 0b11111110,
@EllieTheYeen
EllieTheYeen / ringbuffertest.py
Created May 29, 2024 18:19
Python ring buffer test
class RingBuffer:
full = False
readpos = 0
writepos = 0
def __init__(self, size=8):
self.size = size
self.buf = [0] * size
def take(self):
if self.readpos == self.writepos:
if self.full:
// Settings
//#define DEBUG
#define MAXSTR 128
// Morse logic
class RingBuffer {
private:
size_t size;
unsigned char readpos;
@EllieTheYeen
EllieTheYeen / structportgpio.ino
Created May 20, 2024 03:03
Arduino port manipulation using struct
struct PBS {
bool D8 : 1;
bool D9 : 1;
bool D10 : 1;
bool D11 : 1;
bool D12 : 1;
bool D13 : 1;
bool DONOTUSE1 : 1;
bool DONOTUSE2 : 1;
@EllieTheYeen
EllieTheYeen / mulie-shidle.cpp
Last active June 1, 2024 00:51
This is just some test thing for the Arduino multi-function shield or as it funnily is spelled on the board "Mulie-function shidle" where it parses numbers in CSV lines and turns on the 7 segment display and LEDs plus some debouncing that does not work that well
#define BUZ 3
#define KNB A0
#define BT1 A1
#define BT2 A2
#define BT3 A3
#define LD1 10
#define LD2 11
#define LD3 12
#define LD4 13
#define DAT 8