Skip to content

Instantly share code, notes, and snippets.

View neildavis's full-sized avatar

Neil Davis neildavis

View GitHub Profile
@neildavis
neildavis / aburner2_mod_install.sh
Created April 4, 2024 14:24
Script to install After Burner 2 outputs mod onto RetroPie 4.8
#!/usr/bin/env bash
# Var for RetroPie-Setup dir
RETROPIE_SETUP_DIR="${HOME}/RetroPie-Setup"
# Var for where RetroPie stores libretro cores
LIBRETRO_CORES_DIR="/opt/retropie/libretrocores"
# Var for top level dir where we will build stuff
BUILD_DIR="${HOME}/aburner2"
# Var for mame2003-plus-libretro git REMOTE repo URL
GIT_URL_MAME_2003_PLUS_LIBRETRO="https://github.com/neildavis/mame2003-plus-libretro"
@neildavis
neildavis / gist:b42e2beb065a31e5b7953901853f7f45
Created August 1, 2023 12:25
ILI9341 CircuitPython RP2040
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
This test will initialize the display using displayio and draw a solid green
background, a smaller purple rectangle, and some yellow text. All drawing is done
using native displayio modules.
Pinouts are for the 2.4" TFT FeatherWing or Breakout with a Feather M4 or M0.
"""
@neildavis
neildavis / gist:10c5ab23c10e43a3b17de2b407530002
Last active April 24, 2023 17:06
Building Raspberry Pi OS schroots
# Install sbuild tools
DEBIAN_FRONTEND=noninteractive apt update && apt install -y sbuild debhelper ubuntu-dev-tools piuparts binfmt-support qemu-user-static
# Setup config files for sbuild
cat << EOF | tee -a ~/.mk_sbuild.rc
SCHROOT_CONF_SUFFIX="source-root-users=root,sbuild,admin
source-root-groups=root,sbuild,admin
preserve-environment=true"
# you will want to undo the below for stable releases, read `man mk-sbuild` for details
@neildavis
neildavis / pitemps.sh
Last active June 6, 2024 13:50
Raspberry Pi CPU/GPU temps script
#!/usr/bin/env bash
cpu_temp=$(cat /sys/class/thermal/thermal_zone0/temp)
cpu_temp_fp=$(dc <<< "1 k ${cpu_temp} 1000 / p")
echo "CPU temp=${cpu_temp_fp}'C"
echo "GPU $(vcgencmd measure_temp)"