Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Prescott tcprescott

  • Des Moines, Iowa
View GitHub Profile
@tcprescott
tcprescott / sglive2021 draft settings
Last active Oct 30, 2021
SGLive 2021 Draft Settings
View sglive2021 draft settings
SG Live 2021 DRAFT settings
Standard world state w/ starting boots and sword
1) All four swords placed, caps at three (remaining sword replaced with a Green 20)
2) All shields are placed, but capped at Fighter's Shield. Remaining shields are replaced with 5 rupees.
3) Armor capped at blue mail, both are placed (second mail overflows to 5 rupees)
4) All four bottles placed, caps at 2 (remaining bottles replaced with 5 rupees), remaining two bottles are always empty
5) Bow is non-progressive (Bow and the Silver Arrows Upgrade are separate)
6) Half Magic replaced with small magic decanter
7) 2 boss hearts placed and 32 heart pieces placed, leaving a max of 14 hearts if all are collected.
@tcprescott
tcprescott / ec2-instance-store-init.sh
Last active Feb 15, 2021
ec2 format and mount ephemeral instance store disks
View ec2-instance-store-init.sh
#!/bin/bash
#set -e
#set -o pipefail
###
# This script will strip together all disk to create a raid device at /dev/md0
# EC2 instances with a single instance store disk will instead use the raw nvme device
#
# Requires these packages: lvm2 jq mdadm nvme-cli
View no_hints.json
{
"logic": "NoGlitches",
"difficulty": "custom",
"variation": "none",
"mode": "open",
"goal": "ganon",
"weapons": "randomized",
"tournament": true,
"name": "Open - Hints Disabled",
"notes": "SGLive Tournament Qualifier Flagset for v30",
View aiomysql_sa.py
"""models.py"""
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class User(Base):
__tablename__ = 'tbl_user'
id = Column(Integer, primary_key=True)
View enemizercli.core build exception
[root@server1 EnemizerCLI.Core]# dotnet build
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restoring packages for /root/Enemizer-6.0.32/EnemizerCLI.Core/EnemizerCLI.Core.csproj...
Restoring packages for /root/Enemizer-6.0.32/EnemizerLibrary/EnemizerLibrary.csproj...
/root/Enemizer-6.0.32/EnemizerCLI.Core/EnemizerCLI.Core.csproj : warning NU1701: Package 'CommandLineParser 1.9.71' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
Generating MSBuild file /root/Enemizer-6.0.32/EnemizerLibrary/obj/EnemizerLibrary.csproj.nuget.g.props.
Generating MSBuild file /root/Enemizer-6.0.32/EnemizerCLI.Core/obj/EnemizerCLI.Core.csproj.nuget.g.props.
Generating MSBuild file /root/Enemizer-6.0.32/EnemizerCLI.Core/obj/EnemizerCLI.Core.csproj.nuget.g.targets.
View customizer.py
import pyz3r
import tkinter as tk
import sys
from tkinter.filedialog import askopenfilename, asksaveasfilename
from tkinter import messagebox
from tkinter import simpledialog
def show_exception_and_exit(exc_type, exc_value, tb):
import traceback
traceback.print_exception(exc_type, exc_value, tb)
@tcprescott
tcprescott / alttpr_patcher.py
Last active Apr 19, 2020
POC for a ROM patcher for the ALTTPR website, is a complete mess and needs to be cleaned before being used in a real project
View alttpr_patcher.py
import requests
import json
import itertools
import time
start_time = time.time()
def get_hash(patches):
seek = '1573395'
for patch in patches:
View gist:5c41eaceb9041f7e7d4abb99ff298c08
2018-12-23T11:32:08 WSServer - Debug: "Websocket 7ffd52a58690" received "{\"Opcode\": \"PutFile\", \"Space\": \"SNES\", \"Flags\": null, \"Operands\": [\"/romloader/VLDC9.sfc\", \"600000\"]}" (:0, )
2018-12-23T11:32:08 WSServer - Debug: Request is USB2SnesWS::opcode(PutFile) (:0, )
2018-12-23T11:32:08 WSServer - Debug: Device is ADevice::State(READY) (:0, )
2018-12-23T11:32:08 WSServer - Debug: Executing request : 5 Created at QTime("11:32:08.695") - USB2SnesWS::opcode(PutFile) SD2Snes::space(SNES) () ("/romloader/VLDC9.sfc", "600000") WSServer::RequestState(NEW) for "Websocket 7ffd52a58690" (:0, )
2018-12-23T11:32:08 USBCO - Debug: convertir numnber 6291456 to bitarray : "00600000" (:0, )
2018-12-23T11:32:08 USBCO - Debug: CMD : SD2Snes::opcode(PUT) SD2Snes::space(FILE) 0 "/romloader/VLDC9.sfc" (:0, )
2018-12-23T11:32:08 USBCO - Debug: >> "5553424101000000" - 252-272 : "006000002f726f6d
View alttpr_code_display_hexcodes
change the bytes at 0x180215
!ALPHA_BOW = "#$0000"
!ALPHA_BOOM = "#$0001"
!ALPHA_HOOK = "#$0002"
!ALPHA_BOMB = "#$0003"
!ALPHA_SHROOM = "#$0004"
!ALPHA_POWDER = "#$0005"
!ALPHA_ROD = "#$0006"
!ALPHA_PENDANT = "#$0007"
View alttpr_code_display_poc
import requests
import json
req = requests.post(
url="https://alttpr.com/seed",
data=json.dumps({
"difficulty": "normal",
"enemizer": "false",
"logic": "NoGlitches",
"mode": "open",