Skip to content

Instantly share code, notes, and snippets.

Avatar

Brendan Robert badvision

View GitHub Profile
View kfest_logo.a
*= $6000;
!cpu 65c02;
PLOT = $F800
CLEARSCR= $F832
SETCOLOR= $F864
LORES = $C056
GFX = $C050
CURRENT = $0
lda LORES
View README.md
@badvision
badvision / webserver.ino
Created Oct 16, 2018
ESP32 Webserver Example for OLED
View webserver.ino
#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 Sep 4, 2017
Update RetroArch playlist files with missing roms
View update_retroarch_playlists.groovy
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)
View 2b or !2b...
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 Dec 30, 2016
Makes a trippy diagonal line pattern on the VCS
View atari_diag_lines.a
; 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 Nov 8, 2016
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.
View fix_surfacebook_audio.bat
cd "\Program Files (x86)\Windows Kits\10\Tools\x64"
devcon disable IntelAudio*8086*
devcon enable IntelAudio*8086*
@badvision
badvision / disk usage.jsp
Last active May 19, 2016
Call the *nix command line "df -h" to obtain the disk usage of the server
View disk usage.jsp
<%@page session="false" contentType="text/html; charset=utf-8"
pageEncoding="UTF-8" import="java.lang.*,java.io.*"%><%
Process p = Runtime.getRuntime().exec("df",new String[]{"-h"});
p.waitFor();
%><h2>STDERR:</h2><pre><%
String line;
BufferedReader error = new BufferedReader(new InputStreamReader(p.getErrorStream()));
while((line = error.readLine()) != null){
%><%=line%>
<%
@badvision
badvision / all ips.jsp
Created May 19, 2016
List all IP Addresses that the server is listening on.
View all ips.jsp
<%@page session="false" contentType="text/html; charset=utf-8"
import="java.util.*,java.net.*"%><%
List<NetworkInterface> ifaces = Collections.list(NetworkInterface.getNetworkInterfaces());
for(NetworkInterface ifc : ifaces) {
if(ifc.isUp()) {
List<InetAddress> addrs = Collections.list(ifc.getInetAddresses());
for(InetAddress addr : addrs) {
%>
<%=addr.getHostAddress()%><br>