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 / pull_all_apks.py
Created January 16, 2024 01:32
Python script to pull all APKs from non-rooted android device, using adb shell commands
import os
list_pkgs_cmd = "adb shell pm list packages"
list_pkgs = os.popen(list_pkgs_cmd).read().splitlines()
list_pkgs = [pkg.split(":")[1] for pkg in list_pkgs]
for pkg in list_pkgs:
path_cmd = "adb shell pm path {}".format(pkg)
path = os.popen(path_cmd).read().splitlines()[0].split(":")[1]
pull_cmd = "adb pull {} {}".format(path, pkg + ".apk")
@vgmoose
vgmoose / twitter-to-nitter.md
Last active December 29, 2023 03:13
How to set up a Twitter.com to Nitter.net redirecting via MITM with nginx, local dns server (pihole) and self-signed and self-trusted cert and root CA

What is this?

If you run a local DNS server on your network already (such as a Pi-hole), you can use these instructions to set up an HTTPS redirect for certain sites/domains to other ones. This is particularly useful, for instance, if you don't want to visit Twitter anymore but still occasionally want to automatically view content on it through Nitter.

This can be more easily accomplished via browser extensions, but this method is an option to get it on all devices on the network, as long as you trust the cert.

Is this a bad idea security wise? Probably! But if you want to try it, here you go:

Requirements

@vgmoose
vgmoose / uwu_repo.js
Created April 1, 2023 06:28
node uwu_repo.js
import Uwuifier from 'uwuifier';
import fs from 'fs';
const uwuifier = new Uwuifier();
for (var platform of ["switch", "wiiu"]) {
let pkgData = await fetch(`https://${platform}.cdn.fortheusers.org/repo.json`);
var packages = await pkgData.json();
@vgmoose
vgmoose / chatgpt.py
Last active October 29, 2023 20:41
ChatGPT example for openAI using the terminal and python directly, and their new API
#!/usr/bin/env python
import requests
# replace with API key from https://platform.openai.com/account/api-keys
API_KEY = "YOUR API KEY HERE"
TONE = "friendly"
BOT_NAME = "AI"
YOUR_NAME = "Human"
@vgmoose
vgmoose / gdl.sh
Created February 24, 2023 23:16
Implementation of https://github.com/fortheusers/libget repo downloader directly in bash
#!/bin/bash
# libget repo downloader in bash
# requires: curl, jq, and unzip
# the repo URL
REPO_URL="https://wiiu.cdn.fortheusers.org"
VERBOSE=0
vecho () {
@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 / 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 September 19, 2023 02:51
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