Skip to content

Instantly share code, notes, and snippets.

View KokoseiJ's full-sized avatar
🏠
Y'all, Stay home with your IDE.

Kokosei J KokoseiJ

🏠
Y'all, Stay home with your IDE.
View GitHub Profile
@KokoseiJ
KokoseiJ / data_spec.md
Created July 3, 2022 03:00
Fileserve rewrite

Data Structure

Root Data

Root data is the data where all the configs get stored.

It contains 2 keys:

key type description
@KokoseiJ
KokoseiJ / meow.cs
Created May 10, 2022 17:30
WmiNetUtilsHelper Decompiled
// System.Management.WmiNetUtilsHelper
using System;
using System.Management;
using System.Runtime.InteropServices;
using System.Security;
internal static class WmiNetUtilsHelper
{
internal delegate int ResetSecurity(IntPtr hToken);
@KokoseiJ
KokoseiJ / b64test.c
Last active November 11, 2022 04:22
Simple (and portable) Base64 implementation in C
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
int countchr(char *str, char chr) {
int i;
for (i=0; *str != '\0'; *str++ == chr ? i++ : 0);
@KokoseiJ
KokoseiJ / mungal_parser_v3.py
Last active April 18, 2022 15:15
문갤문학 검색기 v3
## Copyright (C) 2022 파이썬 (KokoseiJ)
#
# mungalparser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@KokoseiJ
KokoseiJ / h5ai_downloader.py
Last active July 8, 2022 02:08
Downloads the entire filetree from H5AI powered indexing website
import os
import re
import sys
import time
import threading
import requests
from collections import deque
from bs4 import BeautifulSoup as bs
@KokoseiJ
KokoseiJ / skyrim_wrapper.py
Last active February 19, 2022 06:44
Simple Proton wrapper written in Pyrhon
#!/usr/bin/env python3
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from tkinter import messagebox
import os
import sys
import subprocess
@KokoseiJ
KokoseiJ / setup_ish_vnc.sh
Created February 3, 2022 06:57
Setup xfce VNC environment on ish
apk add openrc \
xorg-server xf86-video-dummy x11vnc \
xfce4 xfce4-terminal \
rc-update add dbus
cat <<EOF > /etc/profile.d/ish.sh
export DISPLAY=:0
export NO_AT_BRIDGE=1
cat /dev/location > /dev/null &
@KokoseiJ
KokoseiJ / archiveorg_checkhash.py
Last active July 8, 2022 02:08
Check md5 hash of batch downloaded archive.org files
import os
import re
import sys
import requests
from hashlib import md5
from xml.etree.ElementTree import fromstring
if len(sys.argv) < 2:
print(f"Usage: {sys.executable} {sys.argv[0]} xml_url")
@KokoseiJ
KokoseiJ / archiveorg_batchdl.py
Last active July 8, 2022 02:08
Batch download files from archive.org collections
import re
import sys
import requests
import threading
import subprocess
from subprocess import DEVNULL
from urllib.parse import unquote, urljoin
def download_file(url, semaphore):