Skip to content

Instantly share code, notes, and snippets.

View SamusAranX's full-sized avatar

SamusAranX

  • Germany
  • 00:33 (UTC +02:00)
View GitHub Profile
@SamusAranX
SamusAranX / README.md
Last active April 5, 2022 09:07
MIDI reverb remover

Usage

First, install python-midi:

pip3 install "https://github.com/mgedmin/python-midi/archive/refs/heads/python3.zip"

Then, run this script:

@SamusAranX
SamusAranX / fontfacegen.py
Created March 6, 2022 14:02
A script that scans directories containing fonts and generates a CSS file containing @font-face blocks for each of them, complete with somewhat correct naming and font-style/-stretch/-weight values. To make this work with .woff2 files, run a search-and-replace on the resulting file.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
from glob import glob
from os.path import join, relpath
from pathlib import Path
from fontTools.ttLib import TTFont
@SamusAranX
SamusAranX / nsfe_to_nsf.py
Last active February 14, 2021 02:49 — forked from bbbradsmith/nsfe_to_nsf2.py
Merge of Brad Smith's nsfe_to_nsf2.py and nsf2_strip.py scripts with a fancy argparse interface slapped on it. I needed this to downgrade an NSFe file far enough so nsf2midi would recognize it. Putting this here in case anyone else has the same problem.
#!/usr/bin/env python3
import sys
assert sys.version_info[0] >= 3, "Python 3 required."
#
# nsfe_to_nsf2.py
# Brad Smith, 2018-08-24
#
# This converts an NSFe file to a preliminary "NSF2 with metadata" format.
@SamusAranX
SamusAranX / darkmode.css
Last active February 6, 2020 07:10
overcast.fm Dark Mode
:root {
--font: "SF Pro Display", "Inter", "Segoe UI", "Helvetica Neue", "Arial", sans-serif;
--mono-font: "SF Mono", monospace;
--bg-color: #000;
--bg-color1: #1c1c1e;
--bg-color2: #3d3d41;
--fg-color: #fff;
--fg-color1: #98989e;
@SamusAranX
SamusAranX / PhotoViewer.reg
Created December 6, 2019 19:39
A registry file to re-enable the old Windows Photo Viewer on Windows 10
Windows Registry Editor Version 5.00
; Change Extension's File Type
[HKEY_CURRENT_USER\Software\Classes\.jpg]
@="PhotoViewer.FileAssoc.Tiff"
; Change Extension's File Type
[HKEY_CURRENT_USER\Software\Classes\.jpeg]
@="PhotoViewer.FileAssoc.Tiff"
@SamusAranX
SamusAranX / wiiarc.py
Created October 1, 2019 13:03
Extractor for the ARC format used in Ultimate Board Game Collection for the Wii
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
from sys import exit
from os import makedirs
from os.path import getsize, basename, splitext, join
from struct import unpack, calcsize
from time import sleep
@SamusAranX
SamusAranX / fun.cfg
Created December 26, 2018 17:03
C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2 Update\hl2\cfg
r_flashlightfar 2500
r_flashlightfov 75
sk_plr_dmg_357 4000
sk_plr_dmg_airboat 30000
sk_plr_dmg_alyxgun 5000
sk_plr_dmg_357 40000
sk_plr_dmg_ar2 8000
sk_plr_dmg_buckshot 8000
sk_plr_dmg_crossbow 100000
@SamusAranX
SamusAranX / ipin.py
Last active August 13, 2018 13:27
Put this into the same directory as the encoded PNG files and execute the script.
#---
# iPIN - iPhone PNG Images Normalizer v1.0
# Copyright (C) 2007
#
# Author:
# Axel E. Brzostowski
# http://axelbrz.com/
# axelbrz@gmail.com
#
# References:
@SamusAranX
SamusAranX / download_emotes.py
Created October 23, 2017 21:28
Download Twitch channel emotes
#!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
#
# put all channels you want to download the emotes of
# into a text file called "channel_list.txt", separated
# by line breaks
# also download subscriber.json from
# https://twitchemotes.com/apidocs
# and put it into a folder called "api" next to this script
@SamusAranX
SamusAranX / readme.md
Last active May 21, 2020 01:29
A Python script that automates some complicated aspects of ffmpeg