Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard nyuszika7h

View GitHub Profile
View lossless-stream-rip-cheatsheet.md

Lossless stream rip cheatsheet

This is a short cheatsheet to help you determine whether a release from Amazon, Hulu, or Netflix contains the lossless/untouched (as in no further loss of quality compared to what the streaming services provide) video/audio or not. Most newer P2P releases are correctly tagged, but for older releases, it cannot be reliably determined based on the tags alone.

In most cases, non-lossless rips from these services are screen captures (which, when done by professional releasers, should be high quality and contain little to no glitches – see the history section for details), but in some cases they may be simply reencoded from the untouched stream, for example to crop black bars or reencode from a higher-quality stream to achieve better quality. Also, generally the audio is untouched even when the video is not, but that's not always the case. There is no easy way to differentiate these cases, so I'm only describing what to look for in regards to lossless video streams, and for those

@nyuszika7h
nyuszika7h / AutoResize.avsi
Last active Feb 16, 2021
AutoResize function for AviSynth - intelligent resize to 1080p, 720p, SD (720px wide) or any custom resolution
View AutoResize.avsi
### Changelog ###
# - Moved rounding function as standalone function (RoundHalfToEven.avsi). Don't use mod2 when calculating the height of yv24/yv16.
# - Round to the nearest even when the fraction is 0.5. Mode is changed to integer when mode "sd" is not used.
# - Added Crop() for cropping values >(-)1.
# - Added left, top, right, bottom, fill_margins parameters.
# - Added dither_type parameter.
### AutoResize function for AviSynth - intelligent resize to 1080p, 720p, SD (720px wide) or any custom resolution
@nyuszika7h
nyuszika7h / urlschemes.json
Last active Feb 13, 2021
iOS app URL schemes for Icon Themer shortcut
View urlschemes.json
{
"com.8bit.bitwarden": " ",
"com.agilebits.onepassword-ios": "onepassword://",
"com.apple.airport.mobileairportutility": "apmanage://",
"com.apple.appleseed.FeedbackAssistant": "applefeedback://",
"com.apple.AppStore": "itms-apps://itunes.apple.com/",
"com.apple.AppStoreConnect": "shortcuts://run-shortcut?name=Icon%20Themer&input=%7B%22launch%22%3A%22Connect%22%7D",
"com.apple.artistconnect": "shortcuts://run-shortcut?name=Icon%20Themer&input=%7B%22launch%22%3A%22Artists%22%7D",
"com.apple.bnd": "beatsbond://",
"com.apple.Bridge": "com.apple.bridge://x",
View google_auth_pb2.py
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google_auth.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
View ios_app_signing_no_mac.md

How to create an iOS app signing certificate without a Mac

  1. openssl genrsa -out ios_development.key 2048
  2. openssl req -new -key ios_development.key -out ios_development.csr -subj '/emailAddress=your@email.address, CN=Your Name, C=US'
  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 ios_development.cer -out ios_development.pem
  8. openssl x509 -inform der -in AppleWWDRCAG3.cer -out AppleWWDRCAG3.pem
View ios_ota_sideloading.md

Note: This requires a paid developer certificate or an enterprise certificate. A free developer certificate will not work.

Create an Example.plist file with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>items</key>
@nyuszika7h
nyuszika7h / vs_ffinfo.py
Last active Jan 14, 2021
FFInfo for VapourSynth
View vs_ffinfo.py
import functools
import vapoursynth as vs
core = vs.get_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
View tssalert.sh
#!/bin/bash
while read -r device version; do
board=$(curl -s https://api.ipsw.me/v2.1/firmwares.json | jq -r ".devices[\"$device\"].BoardConfig")
tsschecker -d "$device" -B "$board" -i "$version"
if (( $? == 1 )); then
if [[ ${device,,} == iphone* ]]; then
os=iOS
elif [[ ${device,,} == ipad* ]]; then
os=iPadOS
@nyuszika7h
nyuszika7h / sideload.sh
Created Dec 18, 2020
Sideload IPA on jailbroken iOS device (like AppSync Unified, the installed apps will only work when the device is in jailbroken state)
View sideload.sh
#!/bin/bash
if (( EUID != 0 )); then
printf 'This script must be run as root.\n' >&2
exit 1
fi
if [[ $1 != *.ipa ]]; then
printf 'Usage: %s file.ipa\n' "$0" >&2
exit 1
View fix_wsl_dns.sh
#!/bin/bash
echo 'Updating /etc/wsl.conf...'
printf '[network]\ngenerateResolvConf=false\' | sudo tee -a /etc/wsl.conf > /dev/null
echo 'Updating /etc/resolv.conf...'
printf 'nameserver 8.8.8.8' | sudo tee /etc/resolv.conf > /dev/null
echo 'DNS settings updated. Press Enter to terminate WSL. Any unsaved work will be lost!'
read -r < /dev/tty
wsl.exe --shutdown