Skip to content

Instantly share code, notes, and snippets.

View badvision's full-sized avatar

Brendan Robert badvision

View GitHub Profile
@badvision
badvision / squix_font_editor.html
Created June 20, 2025 03:18
Squix / ESP32 font editor
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OLED Font Simulator - Squix 3.0 Format</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #1a1a1a;
@badvision
badvision / gen_gradient_images.sh
Created January 25, 2024 18:47
Create random images
#!/bin/bash
for (( i=1; i<=500; i++ ))
do
# Generate a random filename
filename="random_image_${i}.png"
# Use ImageMagick to create a random 100x100 pixel image
color1=$(shuf -e $(convert -list color | grep srgb | cut -d' ' -f1) | head -1 | tr [:upper:] [:lower:])
color2=$(shuf -e $(convert -list color | grep srgb | cut -d' ' -f1) | head -1 | tr [:upper:] [:lower:])
*= $6000;
!cpu 65c02;
PLOT = $F800
CLEARSCR= $F832
SETCOLOR= $F864
LORES = $C056
GFX = $C050
CURRENT = $0
lda LORES
@badvision
badvision / README.md
Last active February 1, 2019 04:56
SCRIPT-8
@badvision
badvision / README.md
Created January 30, 2019 21:58
SCRIPT-8
@badvision
badvision / webserver.ino
Created October 16, 2018 15:55
ESP32 Webserver Example for OLED
#include <string>
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <ESPmDNS.h>
#include "SSD1306.h"
#define SDA 4
#define SCL 15
#define RST 16 //RST must be set by software
@badvision
badvision / update_retroarch_playlists.groovy
Created September 4, 2017 06:36
Update RetroArch playlist files with missing roms
import java.util.zip.*
// Update these two lines to match the location of your playlists and what extensions to skip
playlistDir = "C:\\Users\\brobert\\AppData\\Roaming\\RetroArch\\playlists" as File
ignoreExtensions="cht|clt|sav|dtc|txt|html"
def appendPlaylist(playlistFile, path) {
println("Appending ${path}")
// Mac | Linux users change this to forward slash, I could have used the path separator property but I was lazy.
name = path.substring(path.lastIndexOf('\\')+1)
BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB
BB BB 2 B2 B2 B2 B2 B2 2 BB BB B2 B2 2 B B 2 BB B BB 2 B2 B2 B2 B2 B2 2 BB BB
BB BB 2 BB 2 2 2 BB 2 BB B B2 2 2 B B B2 BB B BB 2 BB 2 2 2 BB 2 BB BB
BB BB 2 BB B2 B2 B2 BB 2 BB B2 B 2 BB 2 B2 B BB B2 BB 2 BB B2 B2 B2 BB 2 BB BB
BB BB B2 B2 B2 B2 B2 B2 B2 BB B2 B B2 BB B2 BB 2 B 2 BB B2 B2 B2 B2 B2 B2 B2 BB BB
BB BB B2 2 B BB BB B2 B2 B2 BB B2 2 BB BB 2 B B B B BB B 2 2 B B BB BB BB
BB BB B2 B B B2 BB B2 B2 BB 2 B2 B BB B B2 2 2 B B B2 B2 BB 2 BB B2 2 BB BB
BB BB 2 2 B2 B2 B 2 B2 B BB B2 2 B B 2 BB B 2 B B2 2 BB BB BB B B2 BB BB
BB BB 2 BB 2 B BB B B2 B 2 2 B2 BB B2 BB 2 B2 2 B2 2 BB B B2 B B2 2 BB BB
BB BB B2 BB B2 B2 BB BB B2 B2 2 BB 2 B B B2 B BB 2 B2 B2 B2 2 BB 2 BB BB BB BB
@badvision
badvision / atari_diag_lines.a
Last active December 30, 2016 06:47
Makes a trippy diagonal line pattern on the VCS
; use with 8bitworkshop's VCS IDE
; http://8bitworkshop.com/?platform=vcs
processor 6502
; Include files for Atari 2600 constants and handy macro routines
include "vcs.h"
include "macro.h"
org $f000
@badvision
badvision / fix_surfacebook_audio.bat
Created November 8, 2016 19:53
When resuming from standby on a Surfacebook, HDMI audio becomes unavailable. Get devcon.exe from Microsoft's driver dev toolkit and run this bat script (as administrator!) to disable/enable the audio device.
cd "\Program Files (x86)\Windows Kits\10\Tools\x64"
devcon disable IntelAudio*8086*
devcon enable IntelAudio*8086*