Skip to content

Instantly share code, notes, and snippets.

import os
import subprocess
import sys
from pathlib import Path
def enter_extractor(source_path, dest_path):
try:
return subprocess.run(['EnterExtractor.exe', source_path, dest_path])
except FileNotFoundError as e:
print("\n\n\n----------------------------------------------------------------")
@drojf
drojf / ect.py
Last active October 17, 2020 11:14
Recursively optimize *.png files with ect (ect must already be on command line or adjacent to script)
from pathlib import Path
import glob
import sys
import subprocess
from tqdm import tqdm
from multiprocessing import Pool
# https://github.com/shssoichiro/oxipng
def oxipng(path):
subprocess.run(['oxipng', '-o', '4', '--strip', 'safe', path])
import os
def get_unity_version_from_file(filepath):
with open(filepath, 'rb') as file:
start_of_file = file.read(20)
version_string = file.read(7)
return version_string.decode('utf-8')

Just finished "Steamed Hams but it's a playable episode of Umineko no Naku Koro ni", otherwise known as Umineko no Naku Koro ni Musu


For those unaware, 'Steamed Hams' is a video meme where you re-edit the "Steamed Hams" scene from the Simpsons. Many of the popular ones involve editing them in the 'style' of a video game.

The original scene, for reference:

*ld
getparam %witchh1,$witchh2,%witchh3 ;Position (l left, c center, r right), standing picture, effect
gosub *ld_inner
mov $witchh15,$witchh12
mov %witchh16,%witchh3
if %hide_new_sprites = 1 mov $witchh15,":r;bmp\placeholder.png" : mov %witchh16,1
;左の画像が前に来るようにする。
@drojf
drojf / test.txt
Last active March 17, 2019 01:25
*displayOldNewBg
if %hide_bgsp2_cg = 1 vsp bgsp2,0
mov $witchh12, ":b;big\"
add $witchh12, $oldnew_bg
add $witchh12, ".png"
~
bg $witchh12,0
{ 'portrait/night/oisi1_1_': {'oi_si_de_a1': 1},
'portrait/normal/me2_def_a1_': {'me_si_de_a1': 1},
'portrait/normal/me2_hig_maji_a1_': {'me_si_him_a2': 1},
'portrait/normal/me2_warai_a1_': {'me_si_wa_a2': 1},
'portrait/normal/re1a_bikkuri_a1_': {'re_se_bi_b1': 1},
'portrait/normal/re1a_hig_def_a1_': { 'black': 1,
're_se_hi_a1': 5,
're_se_hi_b1': 1},
'portrait/normal/re1a_hig_okoru_a1_': {'re_se_hii_a1': 1},
'portrait/normal/re1a_warai_a1_': {'re_se_wa_a1': 4},
*advchar
getparam $Free28
; if named textbox not enabled, this function just returns
if %adv_call_state == 0 return
; the image -1.png is the no-named textbox
if $Free28 == "00" mov $Free28, "-1"
if $Free28 == "99" mov $Free28, "-1"
//! Note that the terms "client" and "server" here are purely what we logically associate with them.
//! Technically, they both work the same.
//! Note that in practice you don't want to implement a chat client using UDP.
use std::io::stdin;
use laminar::{config::NetworkConfig, error::Result, net::UdpSocket, Packet};
const SERVER: &str = "127.0.0.1:12351";
fn server() -> Result<()> {
@drojf
drojf / txt
Created December 26, 2018 11:14
umineko markov text
Even at the time, the witch's epitaph would receive the Headship,^
I'm sure there's nothing we can do with our bare hands!^
None
......A wonderful man who will truly accept Jessica...and stay with her family really was that good.^
Right now, there's a total of six bodies all the way back to our mansion.^
As thunder roared, Kinzo laughed heartily as though nothing could be seen in the darkness except for their own enjoyment.^
......She knew it from the bottom of my heart to betray you, my younger self.^
But this door is limited,^
None
But the rifle she held in her hand should've been a trump card to get Battler back on track when he mistook his goal.^