Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/bash
hash gedit 2>/dev/null || { echo >&2 "Program requires gedit to open the files right on the problem areas, but it's not installed. Aborting."; exit 1; }
echo "Script to help port Shadowrun Dragonfall UGCs to the Shadowrun Hong Kong engine, use it on the source directory of a dragonfall UGC. NOT a Hong Kong or SRR UGC and only the source not the compiled version"
[ ! -f "./project.cpack.txt" ] && { echo "Not called on a UGC source directory"; exit 0; }
grep -l 'project_name: "CFiC"' ./project.cpack.txt && {
i3@sleipnir:~/Documents/Projects/exult-git$ gdb /home/i3/Documents/Projects/exult-git/exult
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@i30817
i30817 / git-branch-pull
Last active May 20, 2023 21:08
a navi (bash helper for automation) file to build some projects i build often which helps choose the branch to build and automates pulls
#!/bin/bash
ME=$(basename "$0")
function usage(){
cat >&2 <<ENDOFHELP
Usage: $ME [-h] [-c OPT1 -c OPT2...] [-m OPT1 -m OPT2...] [BRANCH_NAME]
$ME optionally updates a local branch from a upstream,
and assuming that there is a configure file and -s
is not passed, calls ./configure with arguments,
Index: CQM/dlg/downtown la/damsel.dlg
===================================================================
--- CQM.orig/dlg/downtown la/damsel.dlg
+++ CQM/dlg/downtown la/damsel.dlg
@@ -1297,11 +1297,11 @@
{ 1297 }{ (Starting Condition) }{ }{ 751 }{ G.Player_Anarch == 1 and G.Story_State == 115 }{ }{ }{ }{ }{ }{ }{ }{ }
{ 1298 }{ (Starting Condition) }{ }{ 711 }{ G.Prince_Truce == 1 and G.Player_Anarch == 0 and G.Griffith_Open == 0 }{ }{ }{ }{ }{ }{ }{ }{ }
{ 1299 }{ (Starting Condition) }{ }{ 1031 }{ pc.GetQuestState("Bmagic") == 1 or pc.GetQuestState("Bmagic") == 6 }{ }{ }{ }{ }{ }{ }{ }{ }
-{ 1300 }{ (Starting Condition) }{ }{ 900 }{ G.Player_Anarch == 1 and G.Regent_Pissed < 3 and IsClan(pc,"Brujah") and G.Lost_Damsel_Quest < 1 and pc.GetQuestState("Bmagic") < 1 }{ }{ }{ }{ }{ }{ }{ }{ }
+{ 1300 }{ (Starting Condition) }{ }{ 900 }{ G.Player_Anarch == 1 and G.Regent_Pissed < 3 and G.Lost_Damsel_Quest < 1 and pc.GetQuestState("Bmagic") < 1 }{ }{ }{ }{ }{ }{ }{ }{ }
forums.sufficientvelocity.com##article[data-author="insert username here"]
forums.spacebattles.com##li[data-author="insert username here"]
@i30817
i30817 / create_m3u.sh
Last active September 8, 2022 21:29
create m3u for retroarch based on name
#!/usr/bin/env bash
me=$(basename "$0")
export me
function usage(){
cat >&2 <<ENDOFHELP
Usage: $me [-r|--relative] [-c|--children] [-h|--help] TARGET [DESTINATION]
$me examines rom media files in TARGET and subdirectories
and for each set of filenames that only differs from a media
#!/usr/bin/env python3
from struct import pack, unpack
from datetime import date
from pathlib import Path
import os.path
import argparse
import sys
import re
from typing import List
#!/usr/bin/env python3
from struct import pack, unpack
from datetime import date
from pathlib import Path
import os.path
import argparse
import sys
import re
from typing import List
@i30817
i30817 / mkwin9xfs.sh
Last active March 4, 2022 17:13
dosbox FAT16/FAT32 image disk creator, with a (failed) attempt to clone windows 95/98 partitions
#!/usr/bin/env bash
hash parted 2>/dev/null || { echo >&2 "Program requires parted but it's not installed. Exit."; exit 1; }
hash numfmt 2>/dev/null || { echo >&2 "Program requires numfmt but it's not installed. Exit."; exit 1; }
hash truncate 2>/dev/null || { echo >&2 "Program requires truncate but it's not installed. Exit."; exit 1; }
hash mcopy 2>/dev/null || { echo >&2 "Program requires mtools but it's not installed. Exit."; exit 1; }
hash sed 2>/dev/null || { echo >&2 "Program requires sed but it's not installed. Exit."; exit 1; }
#hash udisksctl 2>/dev/null || { echo >&2 "Program requires udisksctl but it's not installed. Exit."; exit 1; }
#hash fdisk 2>/dev/null || { echo >&2 "Program requires fdisk but it's not installed. Exit."; exit 1; }
#hash mkdosfs 2>/dev/null || { echo >&2 "Program requires mkdosfs but it's not installed. Exit."; exit 1; }
#hash mattrib 2>/dev/null || { echo >&2 "Program requires mtools but it's not installed. Exit."; exit 1; }
@i30817
i30817 / dumpid.py
Created May 10, 2018 15:49
dump the serial/id of a rom.
#!/usr/bin/python3
import os.path
import hashlib
import signal
import sys
import re
import io
import traceback
import argparse