Skip to content

Instantly share code, notes, and snippets.

View PoomSmart's full-sized avatar
💻

Thatchapon Unprasert PoomSmart

💻
View GitHub Profile
@PoomSmart
PoomSmart / build-rootless.sh
Last active April 24, 2024 13:38
Shell script to build your tweaks compatible with rootless jailbreak.
#!/usr/bin/env bash
set -e
PROJECT="$1"
if [ -z "$PROJECT" ]; then
echo "Usage: $0 <project>"
exit 1
fi
@PoomSmart
PoomSmart / YouTubeDefaultVideoQuality.x
Last active April 28, 2024 08:31
Sets the default video quality for videos on iOS YouTube.
#import <YouTubeHeader/MLAVPlayer.h>
#import <YouTubeHeader/MLHAMPlayerItem.h>
#import <YouTubeHeader/MLQuickMenuVideoQualitySettingFormatConstraint.h>
int targetResolution = 1440;
int targetFPS = 60;
static NSString *getClosestQualityLabel(NSArray <MLFormat *> *formats) {
int minDiff = INT_MAX;
int selectedFPS = 0;