Skip to content

Instantly share code, notes, and snippets.

View gingerbeardman's full-sized avatar

Matt Sephton gingerbeardman

View GitHub Profile
@gingerbeardman
gingerbeardman / file.io.sh
Last active April 25, 2024 05:49 — forked from devster/file.io.sh
Simple cli tool to use file.io https://www.file.io/#one Install: curl https://gist.githubusercontent.com/gingerbeardman/a7737e4c89fccab8605f8538ddaeec0d/raw/a78f5253b0fcdbd7b893f91627a29498690356ea/file.io.sh | sudo tee /usr/local/bin/file.io && sudo chmod +x /usr/local/bin/file.io
#!/bin/sh
URL="https://file.io"
DEFAULT_EXPIRE="14d" # Default to 14 days
if [ $# -eq 0 ]; then
echo "Usage: file.io FILE [DURATION]\n"
echo "Example: file.io path/to/my/file 1w\n"
exit 1
fi
@gingerbeardman
gingerbeardman / maboshi-dslite.scad
Created April 20, 2024 19:26
Mockup of a modded DSlite specifically to play the game MaBoShi
// MaBoShi DSlite mod idea
$fn = 50;
module roundedcube_simple(size = [1, 1, 1], center = false, radius = 0.5) {
size = (size[0] == undef) ? [size, size, size] : size;
translate = (center == false) ?
[radius, radius, radius] :
[
@gingerbeardman
gingerbeardman / huginn.yahooauctions.json
Created April 19, 2024 12:27
Huginn JSON for Yahoo! Japan Auctions
{
"expected_update_period_in_days": "1",
"url": [
"https://auctions.yahoo.co.jp/search/search?p=花札&en=Hanafuda&exflg=1&b=1&n=100&s1=new&o1=d&mode=1",
],
"type": "html",
"mode": "on_change",
"extract": {
"url": {
"css": "a.Product__titleLink",
{
"name": "NDS MaBoShi",
"identifier": "com.gingerbeardman.delta.ds.maboshi",
"gameTypeIdentifier": "com.rileytestut.delta.game.ds",
"debug": false,
"representations": {
"iphone": {
"edgeToEdge": {
"portrait": {
"extendedEdges": {
@gingerbeardman
gingerbeardman / FinderHackMod_CDRV_0_.FinderHack.68k.asm.txt
Created April 15, 2024 13:48
main code resource for FinderHackMod (oddly labelled as CDRV rather than DRVR)
# name: .FinderHack
# flags: 0x6400 (ENABLE_CONTROL, NEED_TIME, NEED_LOCK)
# delay: 1
# event mask: 0x0000
# menu id: 0
# open label: 0022
# prime label: 00A0
# control label: 0040
# status label: 00A0
# close label: 01D6
@gingerbeardman
gingerbeardman / convert2unicode.tcl
Last active April 12, 2024 20:04
Convert legacy text encodings to Unicode (UTF-8)
#!/opt/local/bin/port-tclsh
set ver {2021.12.02}
set author {Matt Sephton @gingerbeardman}
package require cmdline
set parameters {
{encoding.arg macJapan "source encoding, default:"}
{list "list encodings"}
@gingerbeardman
gingerbeardman / 40 things.txt
Created April 5, 2024 13:53
40 things I have learned being a creative entrepreneur, by Michael Flarup, 2024 (Strategies for Playdate)
40 things I have learned\being a creative entrepreneur\\\\Michael Flarup\2024
system
Do what you think is fun
You become what you work on
Creative work\doesn't follow a straight line\from not-good to good
Be opinionated\about your work
Nothing is perfect
Find inspiration\in things you love
Love things fiercely
Impress your inner child\(or your actual children)
@gingerbeardman
gingerbeardman / rq_parallel.sh
Created March 22, 2024 16:18
parallel version of script in the Alfred Remove Quarantine workflow
# Helpers
function app_as_json {
/usr/bin/osascript -l JavaScript -e 'function run(argv) { return JSON.stringify({
title: $(argv[0]).stringByDeletingPathExtension.lastPathComponent.js,
subtitle: argv[0],
type: "file",
icon: { type: "fileicon", path: argv[0] },
arg: argv[0]
})}' "${1}"
}
@gingerbeardman
gingerbeardman / 192.168.8.1.js
Created March 4, 2024 18:42
Web UI login script for Huawei 5G CPE Pro router (H112-370)
if ( window.location.pathname.startsWith('/html/index.html') ) {
document.getElementById("login_password").value = "YourPasswordGoesHere!!1!"
setTimeout(function(){ document.getElementById("login_btn").click(); }, 300);
}
@gingerbeardman
gingerbeardman / croc-tout.bas.txt
Last active February 13, 2024 15:13
CROC'TOUT! by Luís Godinho and Jean-Marc Odobez, May 1984, for CASIO PB-100 from https://archive.org/details/ord-poche-23/page/37/mode/1up
535 pas
2 PRINT "CROQ'TOUT !";:GOSUB 99
4 A=0:M=0:I=11:L=0:D=8
6 FOR B=11 TO 0 STEP -1
8 PRINT CSR A;"o";CSR B;">";
10 IF B\GEI;PRINT CSR I;"x";:IF A=I THEN 60
12 GOSUB 90:PRINT CSR B;"-";:GOSUB 90:IF A=B THEN 72
14 IF D>7 THEN 20
16 IF A=F THEN 50