Skip to content

Instantly share code, notes, and snippets.

View qnblackcat's full-sized avatar
💭
I may be slow to respond.

Nguyễn Đạt qnblackcat

💭
I may be slow to respond.
View GitHub Profile
// ==UserScript==
// @name Open Instagram App
// @version 1.0.0
// @author beebeo
// @match *://*.instagram.com/*
// @downloadURL https://gist.github.com/beebeo/7b454b776577d7c0ac9c91a054cf50cb/raw/open-instagram-app.user.js
// @updateURL https://gist.github.com/beebeo/7b454b776577d7c0ac9c91a054cf50cb/raw/open-instagram-app.user.js
// @homepage https://gist.github.com/beebeo/7b454b776577d7c0ac9c91a054cf50cb/
// ==/UserScript==
@AhmedBafkir
AhmedBafkir / YTSignInFix.xm
Last active September 24, 2022 08:34
Fix YouTube sign in for iOS sideloaded > idea by @kkirby
// https://github.com/qnblackcat/uYouPlus/discussions/447#discussioncomment-3672653
%hook SSORPCService
+ (id)URLFromURL:(id)arg1 withAdditionalFragmentParameters:(NSDictionary *)arg2 {
NSURL *orig = %orig;
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:orig resolvingAgainstBaseURL:NO];
NSMutableArray *newQueryItems = [urlComponents.queryItems mutableCopy];
for (NSURLQueryItem *queryItem in urlComponents.queryItems) {
if ([queryItem.name isEqualToString:@"system_version"]
|| [queryItem.name isEqualToString:@"app_version"]
@MTACS
MTACS / hosted.md
Last active November 30, 2023 22:16
Hosted Preference bundle

Hosted Preference Bundles

Create a "hosted" view of a preference bundle outside of Preferences.app, and in a dedicated application.

For application

  • Create new tweak using "iphone/application_modern" template
  • In the app's delegate file add the following to the -(void)applicationDidFinishLaunching:(UIApplication *)application; method:
@juliyvchirkov
juliyvchirkov / macos-sudo-nopasswd.sh
Last active December 17, 2024 09:05
bash: sudo without a password on macOS
#!/bin/bash
#
# Enable nopasswd mode for sudo on macOS from the userspace in fast and totally non-interactive way
#
# Type the password last time to apply the new mode and forget it for any console task for ages
# Use the rollback to restore password protection
#
# Developed and tested by https://juliyvchirkov.github.io/ under the MIT license on macOS Big Sur 11.2.0
#
# Get latest version at https://gist.github.com/juliyvchirkov/3ca76582ed6b6a8366c9e7d60644960d
@BandarHL
BandarHL / fixYouTubeLogin.m
Last active May 6, 2024 13:31
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)
@yifanlu
yifanlu / Ghidra-OSX-Launcher-Script.scpt
Last active April 16, 2025 20:01
Ghidra.app launcher for OSX
@software-mariodiana
software-mariodiana / detect_notch.m
Last active October 10, 2024 23:44
Objective-C method to detect whether the iOS device has a "notch," à la iPhone X.
#import <UIKit/UIKit.h>
/**
* Return YES if iOS device has a notch; NO, otherwise.
*/
- (BOOL)hasDeviceNotch
{
if (([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)) {
// Only iPhones may have a notch.
return NO;
@ChrisTollefson
ChrisTollefson / Boot Camp Assistant - USB Install Disk.md
Last active April 24, 2025 04:53
Boot Camp Assistant - Enabling creation of bootable USB disks for installing Windows
@wkliwk
wkliwk / btt.sh
Last active March 24, 2025 22:10
BTT reset trial time
# BetterTouchTool reset trial time
# ** All preference will reset
echo "remove ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist"
rm -rf ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist
echo "Done"
echo "remove ~/Library/Application\ Support/BetterTouchTool/"
rm -rf ~/Library/Application\ Support/BetterTouchTool/
echo "Done"
@lyqflnh
lyqflnh / ios - ssh - password.txt
Last active March 24, 2025 00:30
ways to change password of the root or mobile account of ur jailbreak ios device
#if u have the root password which default is "alpine"
1.login as root, using command "ssh root@ip address"
2.type ur password: alpine
3.type command "passwd" to change ur root password
4.when it is done, type command "passwd mobile" to change the mobile passwd
#if u forget ur root passwd
1.open the file named "master.password" at /private/etc on ur jailbreak ios device
2.find the string like this:
root:xxxxxxxxxxxxx:0:0::0:0:System Administrator:/var/root:/bin/sh