Skip to content

Instantly share code, notes, and snippets.

Steven Troughton-Smith steventroughtonsmith

Block or report user

Report or block steventroughtonsmith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / Add Web Tab.py
Created Jan 13, 2016
Insert a custom browser tab into Pythonista
View Add Web Tab.py
# 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 May 29, 2019
UIKit+UIFoundation & Foundation for Pythonista - autoconverted from SDK tbd (includes non-public SPI)
View Foundation.py
# 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 Nov 1, 2015
AppleTV App Store Charts US Nov 1 2015
View charts.html
<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 Oct 27, 2015
Run OS X Screen Saver as Wallpaper
View gist:6788b6c340a0aa52345a
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background
@steventroughtonsmith
steventroughtonsmith / Tweak.xm
Created Oct 14, 2015
iOS 9 Enable Splitscreen Jailbreak Tweak (Theos)
View Tweak.xm
/* 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 Dec 3, 2015
WWDC 15 Session Video Lister
View wwdc15sessionlister.m
//
// main.m
// wwcd15sessionlister
//
// Created by Steven Troughton-Smith on 10/06/2015.
//
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
View gist:44a0587f0490b0cfecd1
/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
View Demangle Swift.py
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 / Makefile
Created Jan 19, 2015
Pascal:Mac Linker Error
View Makefile
#
# Requires https://github.com/ksherlock/mpw and an
# install of MPW in the emulator's root (~/mpw)
# Uses modern (Xcode) version of Rez
#
# Location of your mpw binary
MPW=~/bin/mpw
RINCLUDES=/Applications/MPW-GM/Interfaces\&Libraries/Interfaces/RIncludes
View DAHeader.c
/*
* Copyright Apple Computer, Inc. 1986, 1987
* All Rights Reserved
*/
extern int OpenDA();
extern int CloseDA();
extern int ActionDA();
extern int InitDA();
You can’t perform that action at this time.