Skip to content

Instantly share code, notes, and snippets.

View vgmoose's full-sized avatar
🌱
making my way downtown, walking fast

vgmoose vgmoose

🌱
making my way downtown, walking fast
View GitHub Profile
@vgmoose
vgmoose / readme.md
Last active February 10, 2023 21:08
How to remove DRM from ACSM files directly on the Remarkable 2 tablet (generate PDF or EPUB files), via the command line

Unfinished tutorial: Sorry, I really wanted to get this working, but hit an issue getting the proper versions of the library to work on the remarkable itself. I ended up compiling knock on Linux and running it that way. But then, I hit other issues with the type of DRM and account limits, so it seems this is still a tortured area

This tutorial uses the following method to remove DRM from ebooks directly on the remarkable tablet (after installing toltec):

Download

If you don't want to bother self-compiling, for the armv7l remarkable 2, here is a prebuilt binary!

Usage

@vgmoose
vgmoose / overlay.png
Created January 3, 2023 00:51
aroma warning banner icon generator for wiiu apps
overlay.png
class Trie(object):
# this program implements a Trie using a dict,
# by treating sub-dictionaries as sub-trees,
# eg. {"d": {"o": {"g": "END"}, "a": "END"}}
# ^ the Trie accepts the words "dog" and "da"
# (and not "do", since there's no "END" at root["d"]["o"])
def __init__(self):
# initialize dict of words in the Trie
self.words = {}
@vgmoose
vgmoose / a_redblueslow.md
Last active October 8, 2024 06:21
Pokémon Red and Blue ROM Patches with Slowed Down Music

These are patches for Red/Blue that are built with their music tempo slowed down 2x and 4x. This is done by changing this line in the decompilation (to HIGH(\1 * 2), LOW(\1 * 2) or HIGH(\1 * 4), LOW(\1) * 4).

This creates a slightly better experience if you use 2x or 4x speed up / fast forwarding in an emulator, so that the sound isn't just a cacophony of sped up noises. It's not perfect though!

Downloads

@vgmoose
vgmoose / en.txt
Last active December 10, 2022 23:32
All English strings as of Homebrew App Store 2.3. If you'd like to contribute a translation for the upcoming localization support, please edit this file and make sure the 115 lines in the new language's file match up with the number of lines here. Then post the file to gist and link to it in a comment below-- and thank you!
Go Back
Leave Feedback
Homebrew App Store
by fortheusers.org
Licensed under the GPLv3 license. This app is free and open source because the users (like you!) deserve it.
Let's support homebrew and the right to control what software we run on our own devices!
Repo Maintenance and Development
These are the primary people responsible for actively maintaining and developing the Homebrew App Store. If there's a problem, these are the ones to get in touch with!
Library Development and Support
Without the contributions to open-source libraries and projects by these people, much of the functionality within this program wouldn't be possible.
@vgmoose
vgmoose / a_readme.md
Last active February 26, 2026 01:17
Yet another How to Create a Windows 11 Install USB from Ubuntu Linux or Mac

Creating a Windows 11 Install USB in 2022

I have been installing Windows for a long time. Does it get easier? I want to say it gets easier, but it seems like there's always some new wrinkle! These instructions are as much a note to my future self as they may be useful to anyone else.

For me, I was not able to get any exfat-based installs, or even any of the GUI helpers to make this process any more straightforward. Maybe on your target Windows / host OS those helpers will work, but the below process (as of current year) is consistent, and not overly complicated.

Overview:

  1. Downloading an official ISO image from MS:
  2. Formatting the drive (at least 8GB) as GPT, and one FAT-format partition (aka MS-DOS)
@vgmoose
vgmoose / parse_id3.cpp
Last active September 7, 2022 09:32
Parsing id3 title, album, artist info using mpg123
// returns a size-3 vector of: (title, artist, album)
std::vector<std::string> CST_GetMusicInfo(Mix_Music* music) {
std::vector<std::string> info;
// these three methods require a recent (late 2019) sdl_mixer verison
// info.push_back(Mix_GetMusicTitle(music));
// info.push_back(Mix_GetMusicArtistTag(music));
// info.push_back(Mix_GetMusicAlbumTag(music));
// adapted from https://gist.github.com/deepakjois/988032/640b7a41b0e62a394515697c142777ad3a1b8905
auto m = mpg123_new(NULL, NULL);
@vgmoose
vgmoose / roku_vol.py
Created July 18, 2022 02:46
Python script to relatively adjust the volume of a roku TV, can be used in combination with http://devtools.web.roku.com/RokuRemote/
import os, sys
# You can hardcode the IP here if it does not change much
ip = "192.168.1.111"
args = sys.argv
del args[0]
if len(args) == 0:
print("Needs one or two arguments, eg:")
@vgmoose
vgmoose / thread_runner.py
Created June 24, 2022 22:06
Multiprocessing pool equivalent for python threading (use like: ThreadRunner(5).parallelize(func, [data]), similar to Pool(5).map(func, [data])
# for multiple cores stuffs
import threading
from collections import deque
NUM_CORES = 7
# NUM_CORES = 62
class ThreadRunner:
def __init__(self, num_cores=NUM_CORES):
self.num_cores = num_cores
s1 = "@Jam this campaign is actually made by gad, is he aware that's going out to all tempers?".lower()
s2 = "@jm it has a new logo is probably why you didn't recognize it!".lower()
x, y = 0, 0
out = ""
while x < len(s1) and y < len(s2):
print(out)
if s1[x] == s2[y]:
out += s1[x]
else: