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 / 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"""いる
今日私は一日中家にいる。
@vgmoose
vgmoose / count.py
Last active Sep 24, 2018
wget https://pastebin.com/raw/vs5UfDF3; cat vs5UfDF3 | python3 count.py
View count.py
from urllib.request import urlopen
from urllib.parse import urlencode
import json
print("Enter list of titles separted by a new line (or pipe into this program)")
while True:
try:
TITLE = input().rstrip()
except:
View fetch_img.sh
URL="https://dl.google.com/dl/android/aosp/ryu-opm4.171019.021.n1-factory-1f31fdce.zip"
TMP="tmp.zip"
OUT="output.zip"
# fetch the important "PK" region from the remote zip by specifying offsets*
curl --header "Range: bytes=1842-3820027" -k $URL > $TMP
# restore "corrupted" zip data (answer yes to question it prompts)
echo y | zip -FF $TMP --out $OUT
View zipzag.py
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def zigzagLevelOrder(self, root):
# evil test case
View out6.txt
あい
あう
あか
あし
あせ
あち
あっ
あつ
あと
あな
View search.py
import urllib2
import json
"""search for homebrew on either app store"""
def search(query):
response = urllib2.urlopen("http://switchbru.com/appstore/repo.json")
contents = str(response.read())
packages = json.loads(contents)["packages"]
query = query.lower()
View shadowtriad.txt
# This is an edited version of File 1194 in B2W2's a/0/5/6 narchive
# It can be converted into the 6_1194 to be injected into the narc by using:
# https://github.com/vgmoose/pypokescript and running it on this .txt file
# (the output must be pasted into a hex editor at this time)
# ((no I don't know if it works on other script files, but hopefully the project will grow with time))
# actor variables
Cilan = 0001
Chili = 0000
Cress = 0002
@vgmoose
vgmoose / matterbridge.toml
Created Feb 8, 2018
mattermost irc to discord bridge for switchbru, replace [INSERTBOTTOKEN] with discord access token, see: https://github.com/42wim/matterbridge/wiki/Discord-bot-setup for discord bot config
View matterbridge.toml
[irc]
[irc.freenode]
Server="irc.freenode.net:6667"
Nick="botircnickname"
RemoteNickFormat="<{NICK}> "
[discord]
[discord.test]
Token="[INSERTBOTTOKEN]"
Server="WiiUBru & SwitchBru"
View wiiulinux.md

notice: Wii U linux is not production ready! Proceed at your own risk. Written on 2/3/18

Quarktheawesome and rw-r-r_0644 have released an early version of Linux for Wii U!

Source code

The PowerPC side of the Wii U requires a custom linux kernel, which can be found here. The ARM side of the Wii U requires a custom fw.img file to load that kernel, which can be found here.

Once the kernel is up and running, the first repo is configured to automatically try to load programs from /dev/sda1 in an inserted usb. The first partition of an ext4 USB stick should contain a root filesystem for a linux distribution. See here for more information on a prebuilt PowerPC image

Notice