Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am sanaki on github.
  • I am kickmeelmo (https://keybase.io/kickmeelmo) on keybase.
  • I have a public key ASDnUdfJTy08eVaSXgO521i_tLdZf_ma6DBjWjlexYpYAQo

To claim this, I am signing this object:

@Sanaki
Sanaki / updatera
Last active February 5, 2022 07:57
Script for building retroarch and select cores
#!/usr/bin/env bash
# Known non-working (YMMV): Dosbox SVN CE (Dosbox Pure is now preferred anyway), Emux (requires a special build recipe), easyrpg (relies on a rather specific server setup and scripts now)
# Partial Reference: https://libretro.readthedocs.io/en/latest/development/retroarch/compilation/linux-and-bsd/
# FORCE when set to YES will build regardless of changes
# NOCLEAN when set to 1 will prevent make clean before each build. Do not use NOCLEAN on core recipes or cores won't pull changes. Due to this situation I recommend against building MAME as part of this script.
# EXIT_ON_ERROR determines if the build stops on errors
# SINGLE_CORE can be set to a core name to bypass building the entire recipe (core set)
@Sanaki
Sanaki / hashfbn
Last active January 17, 2021 22:55
Generate RetroAchievements hash lists for FBNeo sets
#!/usr/bin/env bash
function getfbninfo {
path=$HOME"/.local/share/fbneo/dats/"
[[ $2 = "bare" ]] && file=${1##*/} || file=${1#./}
file=${file%.7z}
case "${file%%/*}" in
"coleco")
@Sanaki
Sanaki / chdextract
Last active August 1, 2020 05:19
CD-type chd extractor (V5 only, supports clones)
#!/usr/bin/env bash
declare -A parents
function getparents {
for i in *.chd; do
if [[ "$(xxd -ps -s 104 -l 20 "$i")" = "0000000000000000000000000000000000000000" ]]; then
parents["$(xxd -ps -s 84 -l 20 "$i")"]="$i"
fi
done
}