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 / dl.sh
Created February 24, 2023 21:34
Download packages from a pacman repo in bash directly, without pacman installed
#!/bin/bash
# pacman downloader in bash
# requires: curl and tar
# the repo name and URL (includes OS)
REPO_NAME="my-repo"
ARCH=$(uname -m)
REPO_URL="https://packages.yourpacmanrepo.com/$ARCH"
VERBOSE=0
@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 / scores.txt
Last active January 31, 2023 00:37
Wordle Scores
Wordle 590 5/6
⬛⬛🟩⬛🟩
⬛🟩🟩⬛🟩
⬛🟩🟩🟨🟩
🟩🟩🟩⬛🟩
🟩🟩🟩🟩🟩
Wordle 417 6/6*
@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 / 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 / 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 / readme.md
Last active July 12, 2022 20:31
Mario 3D All Stars - Mario 64 Shindou Edition BLJ mod
@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