Skip to content

Instantly share code, notes, and snippets.

Super Metroid and A Link to the Past Combination Randomizer
Retro Arch
bsnes-mercury-(accuracy, balanced, or performance) core is recommended for non-potato PCs (even @Xamel should be fine):
https://retroarch.com/?page=platforms
https://www.retroarch.com/?page=cores
if on steam the mercury cores are not DLCs yet so manual fuckery is needed:
https://steamcommunity.com/sharedfiles/filedetails/?id=2777383392
@JamesOsborn-SE
JamesOsborn-SE / xwinpaste.sh
Created October 14, 2022 16:05
paste clipboard to a window
#!/bin/bash
# Good for windows that won't let you paste or VMs/Remote connections that don't share clipboards, etc.
echo click the window
windowId=$(xwininfo | awk '/Window id/ {print $4}')
xdotool windowactivate "$windowId"
sleep 2
xclip -o| xdotool type --delay 35ms --clearmodifiers --window $windowId --file -
@JamesOsborn-SE
JamesOsborn-SE / prepare-commit-msg
Last active November 7, 2022 23:16
git mob plus jira ticket number in branch mixin
#!/usr/bin/env node
// Propose: to add jira ticket from branch name and co-authors to the commit message when using `git commit -m`
// Requires node 😜
// To use: place in `.git/hooks/prepare-commit-msg` for the repos you want to use this
// and make sure it's executable with `chmod +x .git/hooks/prepare-commit-msg`
// remixed from https://github.com/rkotze/git-mob/blob/master/hook-examples/prepare-commit-msg-nodejs
@JamesOsborn-SE
JamesOsborn-SE / azureConfig2Local.py
Last active March 23, 2022 18:50
Azure Advanced Config to Local appsettings.json
import json
def empty_lines_input(prompt='> ', n_lines=2):
'An `input` with `n_lines` empty line ending.'
all_input_strings = ''
# prompt the user for input
given_input = input(prompt)
all_input_strings += given_input
@JamesOsborn-SE
JamesOsborn-SE / Tuya_TS0044_remote.yaml
Last active March 6, 2022 21:34
Zigbee2MQTT - Tuya 4-Button Scene Switch blueprint
blueprint:
name: Zigbee2MQTT - Tuya 4-Button Scene Switch
description: Automate your Tuya 4-Button Scene via Zigbee2MQTT MQTT Topic.
domain: automation
input:
mqtt_topic:
name: Tuya 4-Button Scene MQTT Topic
description: Tuya 4-Button Scene QMTT Topic to use
button_one_short_press:
name: Single Press - Button 1
@JamesOsborn-SE
JamesOsborn-SE / hall-light.yaml
Created July 31, 2021 23:05
hall light ESP Home
substitutions:
comment: "hall light"
devicename: hall-light
platform: ESP8266
board: esp01_1m
esphome:
name: $devicename
platform: $platform
board: $board
@JamesOsborn-SE
JamesOsborn-SE / 8ball.sh
Created August 22, 2020 19:57
Magic 8-ball shell script.
#!/bin/sh
shuf -n 1 << EOF
It is certain.
It is decidedly so.
Without a doubt.
Yes – definitely.
You may rely on it.
As I see it, yes.
Most likely.
Outlook good.