Skip to content

Instantly share code, notes, and snippets.

View BrynM's full-sized avatar

Bryn Mosher BrynM

View GitHub Profile
@BrynM
BrynM / README.txt
Last active January 24, 2023 18:07
NMS Save Backup Batch File
Put the batch file in your HelloGames directory and create a shortcut to use it
on your desktop or something. On my windows machine, that directory is something
like `C:\Users\BrynM\AppData\Roaming\HelloGames`.
You'll also need a `zip` program in your `$PATH` such as 7zip (https://www.7-zip.org/).
@BrynM
BrynM / backup.bat
Created January 5, 2022 06:31
NMS Save Backup Batch File
@echo off
setlocal ENABLEDELAYEDEXPANSION
REM User settgins
set nmsSaveDir=NMS
set outDir=%nmsSaveDir%_backups
REM Automated settings
@BrynM
BrynM / ProperHelpFormatter.py
Created January 24, 2021 09:13
ProperHelpFormatter.py
class ProperHelpFormatter(configargparse.RawDescriptionHelpFormatter):
paragraph_edge = re.compile(r"(\n\s*\n)", re.MULTILINE)
class _Section(configargparse.RawDescriptionHelpFormatter._Section):
def format_help(self):
if self.parent is not None:
self.formatter._indent()
join = self.formatter._join_parts
item_help = join([func(*args) for func, args in self.items])
if self.parent is not None:
self.formatter._dedent()
@BrynM
BrynM / gt11Rankings.js
Last active May 27, 2019 04:00
gt11Rankings
// get top-level entries exclusing collapsed
var entries = $('.commentarea > .sitetable > .comment:not(.collapsed) > .entry');
var final = [];
// loop through the entries recording author, score, and page position
for (var i = 0; i < entries.length; i++) {
var tagline = entries[i].querySelector('.tagline');
// account for which score to take depending on voted state (ug)
var score = entries[i].classList.contains('likes') ? tagline.querySelector('.score.likes') : entries[i].classList.contains('dislikes') ? tagline.querySelector('.score.dislikes') : tagline.querySelector('.score.unvoted');
final.push({
"author": tagline.querySelector('.author').text,
@BrynM
BrynM / README.md
Last active March 28, 2024 06:23
Steam Workshop Subscriptions Scraper

Steam Workshop Subscriptions Scraper

Description

This is just something I whipped up to dump a listing of my own subscriptions for a particular game. Unfortunately Vavle/Steam doesn't do such a thing natively and I had to get really creative for my list of several hundred items so I could share with a friend.

So I made this little monstrosity over an evening.

Use

@BrynM
BrynM / make.bat
Created August 15, 2017 04:15
For those compiling Go or GCC on Windows via mingw32-make
@echo off
REM For use with mingw32-make.exe
REM http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
mingw32-make.exe %*
@BrynM
BrynM / Sublime Snippets - PHP Documentor
Last active July 14, 2018 00:17
Sublime Snippets - PHP Documentor
# naming gists is dumb...
@BrynM
BrynM / _Riddick_Votes_README.md
Last active February 15, 2016 05:19
Riddick Upvote Models

Riddick vote models in obj format

Since obj files are just text, here are the models I used. Feel free to re-use them. I consider them public domain.

If you can't simply "save" one of the obj files below, just create a new file, paste in the desired text, and rename it with a ".obj" extension.

@BrynM
BrynM / reddit_res_search_links.js
Created July 28, 2015 08:01
Get total links on a reddit search page (may need to load multiple pages with something like RES)
@BrynM
BrynM / gt_seed.js
Last active February 14, 2016 02:42
GifTournament seeding round report generator
// Just run this whole thing on the browser console (copy/paste)
// while on the seeding comments page.
var stor = {};
var ranks = [];
var $tags = $('.commentarea > .nestedlisting > .comment:not(.deleted) > .entry > .tagline');
var rankRpt = 'RANKINGS:';
var matchRpt = 'MATCHES:';
var overRpt = 'OVERFLOW USERS:';
var bye = '*bye*';