Skip to content

Instantly share code, notes, and snippets.

@earthmeLon
earthmeLon / smwCharLut
Last active February 19, 2020 03:41
Determine HEX values for various ASCII characters within Super Mario World.
#!/usr/bin/env python3
# @earthmeLon
'''
Translate ASCII characters to Hex values which map to the same/similar char.
Otherwise:
$: Coin
@: Clock
*: Star
@earthmeLon
earthmeLon / SMW_Shenanigans.mkd
Last active March 12, 2020 19:32
README for SMW Shenanigans @earthmeLon

SMW Shenanigans

Update RAM values to SNES Games, typically Super Mario World, to interact with the game and make changes.

  • Do not intentionally Soft-Lock or Hard-Lock.
  • Do not repeatedly kill the player with the same trick. Spice it up.

Subscribers can use !smwedit commands in chat, while Viewers can spend Melon Seeds to perform writes. Check out SMWCentral's RAM Map to determine Registers and valid Values.

@earthmeLon
earthmeLon / rgb_xy
Last active February 27, 2020 23:28
Translate RGB colour to XY for HUE Lights
#!/usr/bin/env python3
def rgb_xy(red, green, blue):
red = int(red, 16)
green = int(green, 16)
blue = int(blue, 16)
x = round((red * 0.649926 + green * 0.103455 + blue * 0.197109), 6)
y = round((red * 0.234327 + green * 0.743075 + blue * 0.022598), 6)
z = round((red * 0.0000000 + green * 0.053077 + blue * 1.035763), 6)
@earthmeLon
earthmeLon / minecraft-latest-download.sh
Created December 9, 2020 19:19
Determine and download latest Minecraft Server
function minecraft-latest-download(){
export MINECRAFT_MANIFEST=$(curl -s https://launchermeta.mojang.com/mc/game/version_manifest.json)
export MINECRAFT_LATEST=$(echo "${MINECRAFT_MANIFEST}" | jq .latest.release)
export MINECRAFT_LATEST_VERSION=$(echo "${MINECRAFT_MANIFEST}" | jq -r .latest.release)
export MINECRAFT_LATEST_URL=$(echo "${MINECRAFT_MANIFEST}" | jq -r ".versions[] | select(.id==${MINECRAFT_LATEST}).url")
export MINECRAFT_SERVER_JAR=$(curl -s ${MINECRAFT_LATEST_URL} | jq -r .downloads.server.url)
echo "Retrieving $MINECRAFT_LATEST_VERSION from $MINECRAFT_SERVER_JAR"
curl ${MINECRAFT_SERVER_JAR} --output minecraft-$MINECRAFT_LATEST_VERSION-server.jar
}
@earthmeLon
earthmeLon / 70-fxpak.rules
Last active December 24, 2020 01:08
udev rules for FXPak
# /etc/udev/rules.d/70-fxpak.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5a22", MODE="0666"
@earthmeLon
earthmeLon / picard_tagger_gone.mkd
Created April 1, 2021 20:59
Fix Picard "TAGGER" icon missing from MusicBrainz

Append ?tport=8000 to your MusicBrainz URL. Port 8000 is the default, which could be changed in Picard's Advanced > Network options .

@earthmeLon
earthmeLon / YouTubeQuery.sh
Created April 16, 2021 17:52
Deadbeef - Search Yoube
echo %artist% - %title% | perl -MURI::Escape -ne 'chomp;print uri_escape($_),"\n"' | \
xargs -0 -I {} -i bash -c "xdg-open https://youtube.com/results?search_query={}"
@earthmeLon
earthmeLon / ThunarOpensDirectories.sh
Created April 16, 2021 17:55
Set Thunar to be default application for Directories (all, but ArchLinux)
xdg-mime default thunar.desktop inode/directory
@earthmeLon
earthmeLon / gist:36f0e6ad43b20f4a552db8242bc195b3
Created April 18, 2021 21:35
CRITICAL:whipper.command.main:missing dependency "cd-paranoia"
$ whipper drive analyze
CRITICAL:whipper.command.main:missing dependency "cd-paranoia"
$ sudo ln -sf /usr/bin/cdparanoia /usr/bin/cd-paranoia
@earthmeLon
earthmeLon / SetUnsetPublishTagToLabelValue
Last active June 20, 2021 03:29
What a bunch of bullshit, Traktor.
#!/bin/bash
# @earthmeLon
unset x
unset y
x="$(metaflac "$1" --show-tag=PUBLISHER| sed -rn 's/PUBLISHER=(.*)[\;]*/\1/p' )"
# Only take the first value, since Traktor doesn't support multi-value tags AT ALL.
y="$(metaflac "$1" --show-tag=LABEL| sed -rn 's/LABEL=(.*)[\;]*/\1/p' )"