Skip to content

Instantly share code, notes, and snippets.

View TIny-Hacker's full-sized avatar
🤔
Trying to understand my own code

TIny_Hacker TIny-Hacker

🤔
Trying to understand my own code
View GitHub Profile
@TIny-Hacker
TIny-Hacker / rectangles.py
Last active April 2, 2023 11:21
Rectangles
from kandinsky import *
from random import *
from time import *
while True:
fill_rect(randint(0, 275), randint(0, 200), randint(0, 50), randint(0, 50), (randint(0, 255), randint(0, 255), randint(0, 255)))
sleep(.2)
@TIny-Hacker
TIny-Hacker / gradient.py
Last active April 2, 2023 11:28
Gradient
from kandinsky import *
for y in range (225):
fill_rect(0, y, 320, 200 - y, (0, 0, y))
@TIny-Hacker
TIny-Hacker / text-wrap.c
Last active November 10, 2023 23:06
Simple text wrapping and breaking at the end of words for the TI-84 Plus CE
// Find where to break lines
unsigned int spaceSearch(const char *string, const unsigned int start) {
for (int k = start; k >= 0; k--) {
if (string[k] == ' ') {
return k + 1;
}
}
return start;
}
@TIny-Hacker
TIny-Hacker / timer-debounce.c
Last active May 6, 2024 00:35
Key debouncing with timer
#include <keypadc.h>
#include <time.h>
int main(void) {
// Ensure no key is pressed when the program is first opened
while(kb_AnyKey());
bool keyPressed = false;
// Keep track of an offset for timer stuff
clock_t clockOffset = clock();
@TIny-Hacker
TIny-Hacker / test.py
Last active January 30, 2025 23:23
test
import kandinsky
colors = [kandinsky.color(132, 127, 127), kandinsky.color(90, 90, 90), kandinsky.color(108, 79, 64), kandinsky.color(192, 70, 31), kandinsky.color(165, 132, 90), kandinsky.color(188, 177, 159), kandinsky.color(206, 173, 115), kandinsky.color(239, 231, 206), kandinsky.color(107, 123, 57), kandinsky.color(132, 173, 66), kandinsky.color(58, 83, 57), kandinsky.color(33, 38, 63), kandinsky.color(64, 99, 178), kandinsky.color(57, 64, 113), kandinsky.color(62, 61, 76), kandinsky.color(103, 51, 71)]
tiles = [
[
[11, 11, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 11, 11, 11, 11],