Skip to content

Instantly share code, notes, and snippets.

View steventroughtonsmith's full-sized avatar

Steven Troughton-Smith steventroughtonsmith

View GitHub Profile
/System/Library/AccessibilityBundles/AXSpeechImplementation.bundle/AXSpeechImplementation
/System/Library/AccessibilityBundles/AccessibilitySettingsLoader.bundle/AccessibilitySettingsLoader
/System/Library/AccessibilityBundles/MapKitFramework.axbundle/MapKitFramework
/System/Library/AccessibilityBundles/UIKit.axbundle/UIKit
/System/Library/BulletinBoardPlugins/NanoMailDataProvider.bundle/NanoMailDataProvider
/System/Library/BulletinBoardPlugins/SMSBBPlugin.bundle/SMSBBPlugin
/System/Library/Caches/com.apple.xpc//sdk.dylib
/System/Library/Caches/com.apple.xpcd/xpcd_cache.dylib
/System/Library/CoreServices/Encodings/libArabicConverter.dylib
/System/Library/CoreServices/Encodings/libCyrillicConverter.dylib
@steventroughtonsmith
steventroughtonsmith / wwdc15sessionlister.m
Last active December 3, 2015 22:51
WWDC 15 Session Video Lister
//
// main.m
// wwcd15sessionlister
//
// Created by Steven Troughton-Smith on 10/06/2015.
//
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@steventroughtonsmith
steventroughtonsmith / Demangle Swift.py
Created January 31, 2015 09:14
Hopper Swift demangler
import subprocess
def looksLikeBeginning(doc,seg,adr):
if doc.is64Bits() and seg.readByte(adr) == 0x55 and seg.readByte(adr + 1) == 0x48 and seg.readByte(adr + 2) == 0x89 and seg.readByte(adr + 3) == 0xE5:
return True
if not doc.is64Bits() and seg.readByte(adr) == 0x55 and seg.readByte(adr + 1) == 0x89 and seg.readByte(adr + 2) == 0xE5:
return True
return False
doc = Document.getCurrentDocument()
@steventroughtonsmith
steventroughtonsmith / DrawingKit.swift
Created September 16, 2016 16:43
DrawingKit playground for iOS 10
import PlaygroundSupport
import Foundation
import UIKit
Bundle(path: "/System/Library/PrivateFrameworks/DrawingKit.framework")?.load()
let DKInkView = NSClassFromString("DKInkView") as! UIView.Type
extension UIView {
func newGPUAvailable() -> Bool {
@interface UIWindow (resize)
-(void)_adjustSizeClassesAndResizeWindowToFrame:(CGRect)frame;
@end
typedef enum _UICustomRes
{
UICustomResiPadTwoThirds,
UICustomResiPadHalf,
UICustomResiPadOneThird,
UICustomResiPhone47,
/
target-type: 0x44
mlb-serial-number: syscfg/MLB#/0x20,zeroes/0x20
compatible: D22AP
secure-root-prefix:
AAPL,phandle: 0x01
platform-name: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
device_type: bootrom
region-info: syscfg/Regn/0x20,zeroes/0x20
regulatory-model-number: syscfg/RMd#/0x20
@steventroughtonsmith
steventroughtonsmith / Tweak.xm
Created October 14, 2015 06:33
iOS 9 Enable Splitscreen Jailbreak Tweak (Theos)
/* How to Hook with Logos
Hooks are written with syntax similar to that of an Objective-C @implementation.
You don't need to #include <substrate.h>, it will be done automatically, as will
the generation of a class list and an automatic constructor.
%hook ClassName
// Hooking a class method
+ (id)sharedInstance {
@steventroughtonsmith
steventroughtonsmith / gist:62f0b14d5ef532a4be2e2529187c100d
Created November 18, 2016 17:28
iOS Simulator fullscreen enabler
call ((NSWindow *)[(NSArray *)[[NSApplication sharedApplication] windows] lastObject]).collectionBehavior = 1<<7|1<<8|1<<11
@steventroughtonsmith
steventroughtonsmith / gist:6763213
Created September 30, 2013 12:39
Non-opaque application windows in iOS 7, with optional blur. Shows the user's wallpaper under the app, with Parallax if supported.
typedef enum _UIBackgroundStyle {
UIBackgroundStyleDefault,
UIBackgroundStyleTransparent,
UIBackgroundStyleLightBlur,
UIBackgroundStyleDarkBlur,
UIBackgroundStyleDarkTranslucent
} UIBackgroundStyle;
@interface UIApplication (UIBackgroundStyle)
-(void)_setBackgroundStyle:(UIBackgroundStyle)style;
@steventroughtonsmith
steventroughtonsmith / ToonyPolymer.shader
Last active March 15, 2019 21:56
Toon-based plasticky Unity3D shader
// Plasticky Unity3D shader
// Based on built-in Toon/Lighted
Shader "Custom/ToonyPolymer" {
Properties {
_Color ("Main Color", Color) = (0.5,0.5,0.5,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_Ramp ("Toon Ramp (RGB)", 2D) = "gray" {}
_Shininess ("Shininess", Range (0.1, 1)) = 0.7
_Intensity ("Intensity", Range (0.1, 5.0)) = 1.0