Skip to content

Instantly share code, notes, and snippets.

View celso's full-sized avatar
🔥
On fire

Celso Martinho celso

🔥
On fire
View GitHub Profile
@celso
celso / mouseaccel
Created November 28, 2011 00:47
Patch for vice, the C64 emulator, to allow mouse acceleration option
diff -c -r vice-2.2.orig/src/arch/sdl/mousedrv.c vice-2.2/src/arch/sdl/mousedrv.c
*** vice-2.2.orig/src/arch/sdl/mousedrv.c Mon Sep 21 18:36:09 2009
--- vice-2.2/src/arch/sdl/mousedrv.c Mon Nov 28 02:10:10 2011
***************
*** 31,41 ****
--- 31,45 ----
#include <SDL/SDL.h>
+ #include "cmdline.h"
@celso
celso / gist:2924153
Created June 13, 2012 13:43
Google's list of wanted GTLDs
ADS AND ANDROID APP ARE BABY BLOG BOO BOOK BUY
CAL CAR CHANNEL CHROME CLOUD CORP CPA DAD DAY DCLK
DDS DEV DIY DOCS DOG DOT DRIVE EARTH EAT ESQ EST
FAMILY FILM FLY FOO FREE FUN FYI GAME GBIZ GLE GMAIL
GMBH GOO GOOG GOOGLE GUGE HANGOUT HERE HOME HOW
INC ING KID LIVE LLC LLP LOL LOVE MAIL MAP MBA
MED MEME MOM MOTO MOV MOVIE MUSIC NEW NEXUS PAGE PET
PHD PLAY PLUS PROD PROF RSVP SEARCH SHOP SHOW SITE
SOY SPOT SRL STORE TALK TEAM TECH TOUR TUBE VIP
WEB WOW YOU YOUTUBE ZIP みんな グーグル 谷歌
@celso
celso / gist:3108116
Created July 13, 2012 22:59
ZX81 MP3
[511][0][celso.macpro: ZX81]$ ls -las
total 6992
0 drwxr-xr-x 6 celso staff 204 Jul 13 23:57 .
0 drwx------+ 84 celso staff 2856 Jul 13 23:56 ..
16 -rwxr-xr-x 1 celso staff 13493 Apr 6 2005 Frogger.p
4 -rwxr-xr-x 1 celso staff 84 Apr 6 2005 Frogger.txt
6776 -rw-r--r-- 1 celso staff 6937174 Jul 13 23:57 Frogger.wav
196 -rw-r--r-- 1 celso staff 200283 Mar 14 17:40 tapeutils.jar
[512][0][celso.macpro: ZX81]$ java -classpath tapeutils.jar tapeutils.zx81.PFileUtils -p Frogger.p -play -f Frogger.wav -z FROGGERLength = 13493 filebytes = 13493
[513][0][celso.macpro: ZX81]$ ls -las Frogger.wav
@celso
celso / gist:4525824
Last active December 11, 2015 01:48
Strategies to compile stuff on low memory
A useful recipe for Raspberry Pi hackers
CFLAGS="$CFLAGS --param ggc-min-expand=0 --param ggc-min-heapsize=8192"
Change 8192 to, say, 131072 to use more memory. Ie:
Also, remove “-pipe” from your CFLAGs. Slows down compile but uses less memory.
Also, check the -O option. Sometimes -O2 or -O3 required lots of memory.
@celso
celso / gist:8532048
Created January 21, 2014 00:19
Backing up the Beagle Bone Black eMMC to a remote server (from the BBB)
arm:~# sync ; dd if=/dev/mmcblk0 bs=1M | ssh celso@192.168.1.170 'dd of=~/Desktop/myBBB.img bs=1m'
const url = require("url");
const path = require("path");
const fs = require("fs");
const { readdir } = require("fs").promises;
const https = require("https");
const baseUrl = "https://api.wall-box.com/";
const httpOptions = {
hostname: "api.wall-box.com",
@celso
celso / gist:6b0206e6a78b5d1a76eb0150090eb385
Last active February 6, 2023 09:39
emu68 SD card preparation with MacOSX
diskutil list external physical
diskutil partitionDisk disk3 MBR "MS-DOS FAT32" "BOOT" 256MB "Free Space" "Disk" R
sudo fdisk -e /dev/disk3
# prints table
print
# edit empty partition and change its id
edit 2
# Partition id: 76
@celso
celso / xbee.c
Created January 11, 2024 18:06
void wifiInitialize() {
#if DEBUG_WIFI == 1
SERIAL_PRINTLN(F("Initializing Wifi"));
#endif
pinMode(WIFI_RESET_PIN, OUTPUT);
digitalWrite(WIFI_RESET_PIN,HIGH);
wifiReset();
Serial1.begin(9600); // used with the wifi
SimpleWifi.setUart(&Serial1); // Tell the wifi library that we are not using the SPIUart
SimpleWifi.begin();
events {}
daemon off;
http {
server {
listen 80;
server_name sapo.ua.pt;
location / {
proxy_pass https://sapo.pages.dev;
@celso
celso / a3020.md
Last active October 19, 2025 22:05
Acorn A3020 Notes