Skip to content

Instantly share code, notes, and snippets.

Avatar
🌱
making my way downtown, walking fast

vgmoose vgmoose

🌱
making my way downtown, walking fast
View GitHub Profile
@vgmoose
vgmoose / discordminesweeper.py
Created Jul 30, 2021
Discord minesweeper grid generator with emojis and spoiler tags
View discordminesweeper.py
#!/bin/python3
import sys, random
emojis = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "regional_indicator_x"]
mine = -1
def gen_grid(size, mines):
grid = [[0]*size for _ in range(size)]
half = size // 2
View price-checker.py
import requests #3rd party module
from bs4 import BeautifulSoup
from datetime import datetime
from http.cookiejar import MozillaCookieJar
from amazoncaptcha import AmazonCaptcha
import traceback
import time
import os
import json
View data.txt
721414128511212112141521311232711131213111211311141131213113111114211131251111132111121581111111111111117C1111495151121421111111631A1141121351413211112522113211A2236113342511211141113211511213411221251162232111142132313111312111124535241113123224211231321211512111122112117232412121311189221111131312117131312211113215131116231141311123111451413111212122312511311131321112222115111212111125218125521132
@vgmoose
vgmoose / split_pdf.py
Created Jan 30, 2021
Splits a given PDF file into separate PDFs made up of the odd and even pages
View split_pdf.py
from PyPDF2 import PdfFileReader, PdfFileWriter
import sys
# Splits a given PDFfile into two odd and even page'd PDFs
# Also flips the even pages upside down and reverses their order
# This is to faciliate double-sided printing without having the printer support it
# If there's an odd number of pages, the last page is placed separately in a third PDF
# This helps make it easier to re-feed the paper without worrying about that remainder page
@vgmoose
vgmoose / readme.md
Last active Oct 30, 2021
Mario 3D All Stars - Mario 64 Shindou Edition BLJ mod
View readme.md
@vgmoose
vgmoose / readme.md
Created Aug 16, 2020
On Switchbrew, devkitPro, and Atmosphere
View readme.md

For about the past year, I have been banned on Github from commenting on any issues from the following Github organizations:

I do not know the makeup of these groups and where exactly the overlap lies. As of today, their "People" pages on their Github organizations look like this: https://imgur.com/a/rw8rLkR

On the devkitPro org, Github explains the exact reason for my ban as follows: https://imgur.com/a/m8k8R4X

@vgmoose
vgmoose / fetch.py
Last active Jun 1, 2019
(python3 script)
View fetch.py
from urllib.request import urlopen
from urllib.parse import urlencode
import json
# get a client_id and client_secret from Github -> Settings -> Developer -> Register New Oauth
# then use those and the below curl command to get an access_token
# curl -X POST https://api.github.com/authorizations --data '{"note": "Updater", "client_id": "XXX", "client_secret": "XXX"}' -u USERNAME --header "X-GitHub-OTP: 2FACODE"
ACCESS_TOKEN = "XXXX"
REPO = "https://switchbru.com/appstore/"
@vgmoose
vgmoose / .sh
Created Nov 27, 2018
BZLA LUA recursive file extractor (such as those extracted from BEA files in super mario party)
View .sh
# run within an extracted mini game directory (one of the mg* files)
# recursively snips header from .lua files (.lua.ex) then runs unluac on them to be readable (.lua.ex.txt)
# replace /path/to/unluac.jar to an absolute path where yours is (can be built from here https://github.com/HansWessels/unluac )
find . -name "*.lua" -exec sh -c 'tail -c +21 "$1" > "$1.ex"; java -jar /path/to/unluac.jar "$1.ex" > "$1.ex.txt"' x {} \;
@vgmoose
vgmoose / movetofront.py
Last active Nov 7, 2018
WARNING: will overwrite the default local Anki DB, unless PATH is changed
View movetofront.py
import anki
from anki.storage import Collection
from anki.sync import Syncer, FullSyncer, RemoteServer, HttpSyncer
from pathlib import Path
# git clone git@github.com:dae/anki.git
# cd anki
# pip3 install -r requirements.txt
# python3 demo.py
@vgmoose
vgmoose / kanjiextract.py
Last active Nov 5, 2018
python3 kanjiextract.py
View kanjiextract.py
#/usr/bin/python3
# -*- coding: utf-8 -*-
import re
# regex for hiragana+katakana and a few more characters
blacklist = r'[ぁ-ゟ゠-ヿ「」。、 ?\n]'
# can be copied and pasted from the PDF including linebreaks between the two sets of """
text = u"""いる
今日私は一日中家にいる。