Skip to content

Instantly share code, notes, and snippets.

View steventroughtonsmith's full-sized avatar

Steven Troughton-Smith steventroughtonsmith

View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / gist:52f0c6783446b6fc536e
Created January 17, 2016 06:49
NSExtensionSDK providers
AddressBookUI.framework
(
"com.apple.people-picker"
)
AudioToolbox.framework
(
"com.apple.AudioUnit",
"com.apple.AudioUnit-UI"
@steventroughtonsmith
steventroughtonsmith / Show Tab Overview.py
Last active July 24, 2021 06:17
'Show Tab Overview' script for Pythonista - adds button to toolbar to show tab overview
# coding: utf-8
from objc_util import *
UIApplication = ObjCClass('UIApplication')
UIBarButtonItem = ObjCClass('UIBarButtonItem')
@on_main_thread
def main():
rootVC = UIApplication.sharedApplication().keyWindow().rootViewController()
@steventroughtonsmith
steventroughtonsmith / FileBrowser.py
Created January 14, 2016 22:18
File Browser for Pythonista
# coding: utf-8
from UIKit import *
from Foundation import *
from ctypes import *
libobjc = CDLL('/usr/lib/libobjc.dylib')
QLPreviewController = ObjCClass('QLPreviewController')
@steventroughtonsmith
steventroughtonsmith / Add Web Tab.py
Created January 13, 2016 22:55
Insert a custom browser tab into Pythonista
# coding: utf-8
from Foundation import *
from QuartzCore import *
from UIKit import *
import console
WKWebView = ObjCClass('WKWebView')
@on_main_thread
@steventroughtonsmith
steventroughtonsmith / Foundation.py
Last active November 15, 2023 23:48
UIKit+UIFoundation & Foundation for Pythonista - autoconverted from SDK tbd (includes non-public SPI)
# coding: utf-8
from objc_util import *
NSAKDeserializer = ObjCClass('NSAKDeserializer')
NSAKDeserializerStream = ObjCClass('NSAKDeserializerStream')
NSAKSerializer = ObjCClass('NSAKSerializer')
NSAKSerializerStream = ObjCClass('NSAKSerializerStream')
NSAbstractLayoutGuide = ObjCClass('NSAbstractLayoutGuide')
NSAddressCheckingResult = ObjCClass('NSAddressCheckingResult')
NSAffineTransform = ObjCClass('NSAffineTransform')
@steventroughtonsmith
steventroughtonsmith / charts.html
Last active November 1, 2015 16:17
AppleTV App Store Charts US Nov 1 2015
<head><style>table {margin: -10px} img {width: 160px; height:96px; margin: 5px; border-radius: 15px;}</style></head><body bgColor=lightgrey></body><h3> Paid Apps</h3><p><table width="600" bgcolor="lightgrey"><tbody><tr><td width="50">1)</td><td width="160"><p><img src="http://is1.mzstatic.com/image/thumb/Purple69/v4/29/14/9b/29149b9c-4942-6f61-de71-cb4110559126/source/320x192bb.jpg"></p></td><td>$9.99 <a href="https://itunes.apple.com/us/app/beat-sports/id1044337747?mt=8">Beat Sports</a><p>★★★★✩</p></td></tr></tbody></table></p><p><table width="600" bgcolor="#bdbdbd"><tbody><tr><td width="50">2)</td><td width="160"><p><img src="http://is2.mzstatic.com/image/thumb/Purple69/v4/c2/17/7d/c2177d04-ad91-5fc3-1d68-4b378a2ba46b/source/320x192bb.jpg"></p></td><td>$2.99 <a href="https://itunes.apple.com/us/app/simplex-for-plex/id1049324561?mt=8">SimpleX - for Plex</a><p>★★★✩✩</p></td></tr></tbody></table></p><p><table width="600" bgcolor="lightgrey"><tbody><tr><td width="50">3)</td><td width="160"><p><img src="http://
@steventroughtonsmith
steventroughtonsmith / gist:6788b6c340a0aa52345a
Created October 27, 2015 05:19
Run OS X Screen Saver as Wallpaper
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background
@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 / 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[]) {
/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