This file contains hidden or 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 | |
| # mount | |
| #IPADMOUNTPATH=$(mktemp -d 2>/dev/null || mktemp -d -t bg2mnt) | |
| IPADMOUNTPATH=~/syncbg2mnt # use a constant directory so Unison achive files aren't confused | |
| mkdir "$IPADMOUNTPATH" || exit 1 | |
| ifuse "$IPADMOUNTPATH" --container com.overhaulgames.baldursgateIIenhancededition || exit 2 | |
| # sync | |
| IPADSAVEPATH=${IPADMOUNTPATH%%/}/Library/save |
This file contains hidden or 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
| static const void *<#Capitalized name#>AssociationKey; | |
| - (<#Type#> *)<#Name#> { | |
| return objc_getAssociatedObject(self, &<#Capitalized name#>AssociationKey); | |
| } | |
| - (void)set<#Name#>:(<#Type#> *)newObject { | |
| objc_setAssociatedObject(self, &<#Capitalized name#>AssociationKey, newObject, OBJC_ASSOCIATION_RETAIN_NONATOMIC); | |
| } |
This file contains hidden or 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
| # Record handler exceptions for New Relic | |
| def _new_internalerror(orig_internalerror): | |
| def inner(): | |
| e = orig_internalerror() | |
| if isinstance(e, web.webapi._InternalError): | |
| e.orig_exc_info = sys.exc_info() | |
| return e | |
| return inner | |
| def catch_and_report_exceptions(handler): | |
| try: |