View .bash_history.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prerequisite | |
pip install git+https://github.com/FlyingWolFox/Netscape-Bookmarks-File-Parser.git | |
python # Snippet 1 | |
cd ~/storage/downloads | |
mkdir tmp/th && cd tmp/th | |
# Download descs | |
yt-dlp --skip-download --write-description --no-mtime $(cat ../../bookmarks_pure.txt) |
View test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download and trim audio | |
# yt-dlp does not work for some reason | |
you-get "https://music.163.com/#/song?id=1433075058" | |
mv "0. 惊涛落日(Official Vers.).mp3" jtlr.mp3 | |
sox jtlr.mp3 jtlr_trim.wav trim 101.25 33 | |
# Download video and extract a frame | |
# as a .png file to avoid messing with compression | |
yt-dlp "https://m.youtube.com/watch?v=PJuIWf-sEyA" --sub-langs en --embed-subs -f bestvideo | |
mv "강아지가 엉덩이를 들이미는 이유 6가지 [PJuIWf-sEyA].webm" src.webm | |
ffmpeg -i src.webm -vf subtitles=src.webm -ss 00:00:54 -frames:v 1 frame.png |
View get_mods.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import sys | |
def cmd_maybe(cmd, type): | |
return type in cmd | |
def cmd_as(cmd, type): | |
return cmd[type] | |
def cmds_iter(real_iter, type): |
View recipe.jsonc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// Behaviour of the auto-patcher is defined here | |
// EVERYTHING HERE is subject to change | |
// Always 1 | |
"APILevel": 1, | |
"FriendlyName": "My Crappy Mod 2000" | |
"BasedOn": { | |
// 1 - Undertale, 2 - Deltarune SURVEY_PROGRAM (unsupported), 3 - Deltarune CH1&2 | |
// always 1 ATM | |
"Game": 1, |
View objmgr.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#include <string.h> | |
/* definitions */ | |
/* types & globals */ |
View lerp.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
osr = 2 | |
isr = 10 | |
smps = [0, 1] | |
def lerp(a, b, m): | |
return a + m * (b-a) | |
smpin = [] |
View smpsgen.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from io import StringIO | |
import struct | |
FILE = "D:\development\sonic-cd-disassembly\Sound Drivers\SMPS-PCM\Music\Palmtree Panic Past.bin" | |
PROJ = "PPZPast" | |
NOTES = { | |
0x80: "nRst", | |
0x81: "nC0", 0x82: "nCs0", 0x83: "nD0", 0x84: "nEb0", | |
0x85: "nE0", 0x86: "nF0", 0x87: "nFs0", 0x88: "nG0", |
View ads_textdump_zh.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Text": [ | |
"治愈队友", | |
"饶恕疲倦的敌人", | |
"冻结敌人", | |
"冰魔法伤害", | |
"恢复团队160HP", | |
"恢复120HP", | |
"恢复100HP", | |
"恢复80HP", |
View gen.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageFont, ImageDraw, ImageColor | |
SEPERATOR_COLOR = ImageColor.getrgb("#0000ffff") | |
GLYPHS = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.:<[=>\\{]!|@~_\"`$%'()&}+*,-^#?/;" | |
SIZE = 12 | |
ANCHOR = "la" | |
FILL = "white" | |
FEATURES = "" | |
font = ImageFont.truetype("arial.ttf", SIZE) |
View invert_phase.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydub import AudioSegment | |
org = input("org file : ") | |
out = input("out file : ") | |
aud = AudioSegment.from_file(org) | |
channels = aud.split_to_mono() | |
for i in range(0, len(channels), 2): | |
l_sub_r = channels[i].overlay(channels[i + 1].invert_phase()) | |
r_sub_l = channels[i + 1].overlay(channels[i].invert_phase()) |
NewerOlder