Skip to content

Instantly share code, notes, and snippets.

@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:
@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
<?php
header('Access-Control-Allow-Origin: *');
header('Content-Type: text/html; charset=utf8');
?>
<html>
<body>
<head>
<title>Smol</title>
<style>
html {background-color: #000000; color: #ffffff;}
@EllieTheYeen
EllieTheYeen / pfplog.py
Created February 4, 2024 22:50
Just a thing to sort profile pictures for the plot thread to track where it last was
import os
os.chdir(os.path.split(__file__)[0] or ".")
files = os.listdir("pfps")
fates = []
for a in files:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
API 1 1 0
DHCP 1 1 0
DOM 1 1 0
IO 1 1 1
MySQL 1 0 0
SOAP 1 1 0
SQL 1 1 0
SSL 1 1 0
UI 1 1 1
XML 1 1 0
#!/bin/sh
echo echo test >> /proc/$$/fd/10
echo test