Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import argparse
import os
import subprocess
import sys
from fnmatch import fnmatch
cached_mediainfo = {}
@0xallie
0xallie / vs_ffinfo.py
Last active November 22, 2021 09:01
FFInfo for VapourSynth
import functools
from vapoursynth import core
def FrameInfo(n, f, clip, frame_num=True, frame_type=True, frame_time=True, text=None, color='0000FFFF'):
# NOTE: color is in format AABBGGRR
lines = []
import base64
import uuid
from pymp4.parser import Box
def get_moov_pssh(fd):
while True:
x = Box.parse_stream(fd)
if x.type == b'moov':
@0xallie
0xallie / chapteredit.py
Last active May 27, 2022 14:11
Chapter Editor
#!/usr/bin/env python3.7
import argparse
import re
import sys
from collections import defaultdict
# https://stackoverflow.com/a/9028031/492203
class CustomAction(argparse.Action):
@0xallie
0xallie / btn-site-tags.md
Last active May 29, 2022 12:54 — forked from rlaphoenix/btn-site-tags.md
BTN Site Tags
Site/Network Abbreviation
9Now 9NOW
A&E AE
ABC (AU) iView AUBC
ABC (US) AMBC
Adult Swim AS
Al Jazeera English AJAZ
All4 (Channel 4, ex-4oD) ALL4
Amazon AMZN
from __future__ import annotations
import argparse
import os
import subprocess
from pathlib import Path
def strip_cc(file: Path | os.PathLike[str]) -> None:
"""
@0xallie
0xallie / exit_vs_sys_exit.txt
Last active September 30, 2022 18:00
exit() vs sys.exit()
❯ python
Python 3.10.7 (main, Sep 7 2022, 12:19:18) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... exit()
... except SystemExit:
... print("no exit for you")
... finally:
... print("cleanup")
...
FROM debian:buster AS base
ENV CONF_ARGS="--disable-shared" \
CMAKE_ARGS="-DBUILD_SHARED_LIBS=0" \
CC="clang" \
CXX="clang++" \
LD="ld.lld" \
CFLAGS="-fPIC" \
CXXFLAGS="-fPIC" \
LDFLAGS="-Wl,--allow-multiple-definition"
RUN apt-get -y update && \
@0xallie
0xallie / ios_app_signing_no_mac.md
Last active October 8, 2022 20:17
How to create an iOS app signing certificate without a Mac

How to create an iOS app signing certificate without a Mac

  1. openssl genrsa -out development.key 2048
  2. openssl req -new -key development.key -out development.csr -subj / (subject field doesn't matter, it will be overridden anyway)
  3. Go to developer portal (https://developer.apple.com/account/) -> Certificates, Identifiers & Profiles
  4. Create a new certificate, choose "Apple Development", and upload the .csr file
  5. Download the resulting .cer file
  6. Download the Apple WWDR intermediate certificate from https://www.apple.com/certificateauthority/ (the one that expires in 2030: https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer)
  7. openssl x509 -inform der -in development.cer -out development.pem
  8. openssl x509 -inform der -in AppleWWDRCAG3.cer -out AppleWWDRCAG3.pem
@0xallie
0xallie / decrypt.sh
Last active December 18, 2022 00:01
Decrypt app on a jailbroken iDevice
#!/bin/bash
if [ "$#" -lt 1 ]; then
echo "ERROR: Missing argument." >&2
echo "Usage: $0 --list|<name>"
exit 1
fi
if [ "$#" -gt 1 ]; then
echo "ERROR: Too many arguments." >&2