Skip to content

Instantly share code, notes, and snippets.

@Mabdelwanis
Mabdelwanis / arm64e-linux.sh
Created March 14, 2021 16:12 — forked from seia-soto/arm64e-linux.sh
Installs sbinger's arm64e toolchain to allow arm64e compilation on Linux
curl -LO https://github.com/sbingner/llvm-project/releases/download/v10.0.0-1/linux-ios-arm64e-clang-toolchain.tar.lzma
TMP=$(mktemp -d)
tar --lzma -xvf linux-ios-arm64e-clang-toolchain.tar.lzma -C $TMP
pushd $TMP/ios-arm64e-clang-toolchain/bin
find * ! -name clang-10 -and ! -name ldid -and ! -name ld64 -exec mv {} arm64-apple-darwin14-{} \;
find * -xtype l -exec sh -c "readlink {} | xargs -I{LINK} ln -f -s arm64-apple-darwin14-{LINK} {}" \;
popd
mkdir -p $THEOS/toolchain/linux/iphone
mv $TMP/ios-arm64e-clang-toolchain/* $THEOS/toolchain/linux/iphone/
rm -rf $TMP linux-ios-arm64e-clang-toolchain.tar.lzma
@Mabdelwanis
Mabdelwanis / Google Translate - 2022.user.js
Created May 9, 2022 23:22
This script displays a menu option in your userscript manager to translate the current page using Google Translate
// ==UserScript==
// @name Google Translate - 2022
// @namespace https://greasyfork.org/users/906463-coffeegrind123
// @homepageURL https://gist.github.com/coffeegrind123/8ca2c7e700aca3341c71da8d612f6130
// @supportURL https://greasyfork.org/scripts/443947-google-translate-2022
// @match http*://*/*
// @exclude http*://*.google.*/*
// @grant GM_registerMenuCommand
// @noframes
// @version 2.4
@Mabdelwanis
Mabdelwanis / build-rootless.sh
Created May 15, 2023 02:55 — forked from PoomSmart/build-rootless.sh
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
@Mabdelwanis
Mabdelwanis / LPM.m
Created November 30, 2023 21:45 — forked from MTACS/LPM.m
Toggle Low Power Mode programmatically on iOS 16+
// iOS 16+
// _CDBatterySaver class doesn't exist on versions higher than 16.0
@interface _PMLowPowerMode : NSObject
+ (id)sharedInstance;
- (NSInteger)getPowerMode;
- (void)setPowerMode:(NSInteger)arg0 fromSource:(id)arg1;
- (void)setPowerMode:(NSInteger)arg0 fromSource:(id)arg1 withCompletion:(id)arg2; // Don't use if completion is nil, callback requires non null parameter
@end
@Mabdelwanis
Mabdelwanis / Tweak.x
Created November 30, 2023 22:07 — forked from Danesz/Tweak.x
AVCaptureSession Jailbreak hook
#import <UIKit/UIKit.h>
%hook SpringBoard
-(void) applicationDidFinishLaunching:(id)arg {
%orig(arg);
UIAlertView *lookWhatWorks = [[UIAlertView alloc] initWithTitle:@"PrivacyGuard Tweak"
message:@"Your privacy guard is running 😎"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
%hook SpringBoard
-(BOOL)homeScreenSupportsRotation {
return YES;
}
-(BOOL)homeScreenRotationStyleWantsUIKitRotation {
return YES;
}
@Mabdelwanis
Mabdelwanis / Tweak.xm
Created November 30, 2023 22:09 — forked from Li-blog/Tweak.xm
#import <UIKit/UIKit.h>
%hook SpringBoard
- (void)applicationDidFinishLaunching: (id)application {
%orig;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello World." message:nil delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
@Mabdelwanis
Mabdelwanis / safemode.xm
Created November 30, 2023 22:11 — forked from coord-e/safemode.xm
auto safemode
#define time 3600 //一時間
%hook SpringBoard
-(void)applicationDidFinishLaunching: (id)application {
%orig;
[[NSOperationQueue new] addOperationWithBlock:^{
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:time]];
NSString* string = @[@"Crash"][2];
}];
@Mabdelwanis
Mabdelwanis / SimpleRespring.xm
Created November 30, 2023 22:12 — forked from hetelek/SimpleRespring.xm
A tweak (for iOS 7) that allows you to respring your device by swiping the homescreen card up in the app switcher.
#import <substrate.h>
%hook SBAppSliderController
- (BOOL)sliderScroller:(id)scrollingViewController isIndexRemovable:(unsigned int)index
{
return YES;
}
- (void)sliderScroller:(id)scrollingViewController itemWantsToBeRemoved:(unsigned int)index
@Mabdelwanis
Mabdelwanis / fixYouTubeLogin.m
Created November 30, 2023 22:13 — forked from BandarHL/fixYouTubeLogin.m
Fix YouTube keychain
static NSString *accessGroupID() {
NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:
(__bridge NSString *)kSecClassGenericPassword, (__bridge NSString *)kSecClass,
@"bundleSeedID", kSecAttrAccount,
@"", kSecAttrService,
(id)kCFBooleanTrue, kSecReturnAttributes,
nil];
CFDictionaryRef result = nil;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);
if (status == errSecItemNotFound)