Skip to content

Instantly share code, notes, and snippets.

View idolpx's full-sized avatar
🏠
Working from home

Jaime Idolpx idolpx

🏠
Working from home
View GitHub Profile
@idolpx
idolpx / meatloaf_opendir.php
Last active January 14, 2024 05:05
Meatloaf Server Script - To create commodore basic PRG directory listing of files on server
<?php
//
// Meatloaf - A Commodore 64/128 multi-device emulator
// https://github.com/idolpx/meatloaf
// Copyright(C) 2022 James Johnston
//
// Meatloaf Server Script-----------------------------------------
// Create a directory listing as a Commodore Basic Program
// Responds with binary PRG file ready to load and list
// ---------------------------------------------------------------
@idolpx
idolpx / ANSI-color-codes.h
Last active April 18, 2022 18:51 — forked from RabaDabaDoba/ANSI-color-codes.h
The entire table of ANSI color codes working in C!
/*
* This is free and unencumbered software released into the public domain.
*
* For more information, please refer to <https://unlicense.org>
*/
//Regular text
#define ANSI_BLACK "\e[0;30m"
#define ANSI_RED "\e[0;31m"
std::string byteSuffixes[9] = { "", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
std::string formatBytes(uint64_t value) {
uint8_t i = 0;
double n = 0;
char *f = NULL;
do {
i++;
n = value / std::pow(1024, ++i);
10 rem *** meatloaf icon sprite
20 rem *** -idolpx
30 rem ***
40 poke 53285,8: rem multicolor 1
50 poke 53286,6: rem multicolor 2
60 poke 53269,255 : rem set all 8 sprites visible
70 for x=12800 to 12800+383: read y: poke x,y: next x: rem sprite generation
75 x=30:y=54:poke 53264,peek(53264) and 0 : rem top left
76 rem x=56:y=54:poke 53264,peek(53264) or 255: rem top right
77 rem x=30:y=222:poke 53264,peek(53264) and 0 : rem bottom left
@idolpx
idolpx / mvaz
Last active May 29, 2024 04:18
Move files to directories 0-z based on 1st char of filename
#!/usr/local/bin/python3
#
# Move files to directories 0-z based on 1st char of filename
# https://gist.github.com/idolpx/eadd12cb15daa61d9253f325a0381778
#
# Jaime Idolpx
#
import os, re, py7zr