Skip to content

Instantly share code, notes, and snippets.

View jjwatt's full-sized avatar

Jesse Wattenbarger jjwatt

  • North Augusta, SC
View GitHub Profile
@jjwatt
jjwatt / romdirsplit.bash
Created February 7, 2020 17:47
Quick and dirty way to take a huge directory of roms/disk rips and split them into alphabetical directories. Not the most beautiful, but it gets the job done, you can still browse them and *much* faster dir loading/browsing on SDs
#!/bin/env bash
romdirsplit() {
for letter in {A..Z}; do
mkdir $letter
find ./ -iname "${letter}*" -type f -print0 \
| xargs -0 -L1 mv -t "${letter}"
done
}
@jjwatt
jjwatt / shell.nix
Last active February 24, 2024 12:38
tic-80 building on nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
# inputsFrom = with pkgs; [ pkgconfig autoconf automake gnumake ];
buildInputs = with pkgs; [
gcc
pkgconfig
autoconf
automake
libtool
pcre
@jjwatt
jjwatt / mlexample.bas
Last active January 22, 2020 16:07
Create ML string in Atari BASIC
10 PRINT "9000 DIM ML$(26):ML$=";CHR$(34);
20 FOR LOOP=1 TO 26
30 READ DAT
40 PRINT CHR$(27);CHR$(DAT);
50 NEXT LOOP
60 PRINT CHR$(34)
100 DATA 104,162,255,142,252,2,173,11,212
120 DATA 252,2,224,255,208,3,76,6,32,96
130 REM From 8-bit and more on youtube
140 REM https://youtu.be/OwlAcz6DYzU
@jjwatt
jjwatt / burnDuor.bash
Created December 18, 2019 23:54
Burn Duo-R/PCE-CD/tg16 CD discs in Linux
#!/usr/bin/env bash
_infile="$1"
_basename="${_infile%%.zip}"
_tocfile="${_basename}".toc
CUECONVERT=cueconvert
unzip -tq "${_infile}" || exit 1
mkdir -p "${_basename}"
@jjwatt
jjwatt / helpless.sh
Created September 3, 2019 20:22
helpless
helpless() { "$@" --help | less }
@jjwatt
jjwatt / yplay.scm
Last active March 14, 2023 04:09
The Y Combinator explained in a runnable Scheme file
;;; The Y Combinator explained in scheme.
;;; with credits to:
;;; https://mvanier.livejournal.com/2897.html
;;; Status: WIP
(define fibonacci
(lambda (n)
(cond ((= n 0) 0)
((= n 1) 1)
(else (+ (fibonacci (- n 1)) (fibonacci (- n 2)))))))
@jjwatt
jjwatt / tmux.conf
Created August 10, 2019 22:33
my minimum .tmux.conf
set -g prefix "`"
bind "`" send-prefix
set -g mode-keys "vi"
set -g default-terminal "screen-256color"
@jjwatt
jjwatt / keybase.md
Created April 10, 2019 02:23
keybase.md

Keybase proof

I hereby claim:

  • I am jjwatt on github.
  • I am jjwatt (https://keybase.io/jjwatt) on keybase.
  • I have a public key whose fingerprint is 01EF 9314 E563 8E1E 44FC EF55 9CBD 4CF4 09E7 C52B

To claim this, I am signing this object:

@jjwatt
jjwatt / emacs_and_anki_ir.md
Last active January 1, 2019 17:16
thoughts on IR, Anki and emacs integration

I've been very close to installing SuperMemo in a VM or wine just to try out Incremental Reading, but then I found this:

https://buboflash.eu

I still might do it at some point just so I can see how it works, but this and Anki would probably be more than enough (and both of them seem to respect my freedom!). I have a lot of respect for Woz, and he's brilliant, but I can't see myself using proprietary and Windows-only software even if it hung the moon.

Of course, my version of an ultimate SRS and IR tool would basically bring all the SuperMemo functionality into emacs and org-mode. Web pages and pdfs would present a challenge. Anyway, at least with Anki, we have emacs anki-editor, and org-drill. There's an IR plugin for Anki, too, but I haven't used it yet. It seems like the Buboflash chrome extension could give me a lot of what I would need around web pages for IR an

@jjwatt
jjwatt / molecule.yml
Created November 15, 2018 22:34
molecule base configs and scenario configs
---
# project/roles/your-role/molecule/default/molecule.yml
dependency:
name: galaxy
driver:
name: docker
provisioner:
name: ansible
log: True
lint: