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 / badge_maker.py
Last active June 12, 2024 22:39
Generate a "get it on Homebrew App Store" badge
from PIL import Image, ImageDraw, ImageFont, ImageColor
class Args:
def __init__(self):
self.text = "Homebrew App Store"
self.subtext = "Get it on the"
self.bg_color = "#000000"
self.border_color = "#A6A6A6"
self.output = "hbasbadge.png"
self.icon_path = "icon-11.png"
@vgmoose
vgmoose / rsync_with_overall_progress.py
Last active May 7, 2024 21:59
rsync but with an overall progress indicator, based on the total number of files that needs to be transferred
#!/usr/local/bin/python3
# Usage: python3 rsync_with_overall_progress.py source destination
import subprocess, re, sys, os, argparse
try:
import progressbar
progressbar_module_exists = True
except ImportError:
@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