This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code leverages the pre-existing XML parser in objc but takes just the constant values | |
# without any deeper parsing of classes, structs, etc. | |
# Useful for when objc.loadBundleVariables as used here https://gist.github.com/pudquick/ac8f22326f095ed2690e | |
# is not possible because the constant isn't defined as a framework symbol, only in a header | |
# (which the System .bridgesupport files helpfully included entries for) | |
import objc | |
def constant_loader(framework_bridgesupport_path, target_dict, values = None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hax hax hax hax hax | |
import ctypes, os, sys | |
newstderr = os.dup(2) # This is to mute dyld LC_RPATH warnings | |
os.dup2(os.open('/dev/null', os.O_WRONLY), 2) # because we're loading Xcode frameworks from python | |
CM = ctypes.CDLL('/Applications/Xcode.app/Contents/SharedFrameworks/DVTMarkup.framework/Versions/A/Frameworks/CommonMark.framework/CommonMark') | |
sys.stderr = os.fdopen(newstderr, 'w') # This restores stderr | |
cmark_markdown_to_html = CM.cmark_markdown_to_html | |
cmark_markdown_to_html.restype = ctypes.c_char_p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Reload program and label definitions into a running x64sc session | |
# Send command to emulator's remote monitor | |
send () { | |
echo "$1" | nc -N localhost 6510 >/dev/null | |
} | |
# Verify command line parameters |