Skip to content

Instantly share code, notes, and snippets.

bang bang590

Block or report user

Report or block bang590

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
TimOliver /
Last active Aug 16, 2019
The Bash script I use to compile libDSM for iOS
# Global build settings
export SDKPATH=/Applications/
export SIMSDKPATH=/Applications/
export MIN_IOS_VERSION=7.0
export HOST=arm-apple-darwin
export LDFLAGS_NATIVE="-isysroot $SDKPATH"
export TASN1_CFLAGS="-Ilibtasn1/include"
akisute / SomeWebViewController.m
Last active Jul 30, 2018
Dismissing fullscreen movie player from <video> tag in UIWebView
View SomeWebViewController.m
- (void)exitFullScreenVideo
// Works in iOS, not sure in OS X
[self.webView stringByEvaluatingJavaScriptFromString:@"'video'),function(v){v.webkitExitFullscreen();});"];
// Didn't work in iOS, works in OS X
[self.webView stringByEvaluatingJavaScriptFromString:@"if(document.webkitFullscreenElement){document.webkitExitFullscreen();}"];
MarkVillacampa / JavaScriptCore.m
Last active Dec 27, 2015
Trying to add methods at runtime for the JSExport protocol in JavaScriptCore. As-is, the method is not called from Javascript. Uncomment lines 7-8 and the end of 11, comment line 65, and run. The method is now called from JavaSript. Any idea why?
View JavaScriptCore.m
#import <Foundation/Foundation.h>
#import <JavaScriptCore/JavaScriptCore.h>
#import <objc/runtime.h>
const char *_protocol_getMethodTypeEncoding(Protocol *, SEL, BOOL isRequiredMethod, BOOL isInstanceMethod);
//@protocol MyProtocol <JSExport>
// -(void)one:(id)one;
d0k / gist:3608547
Last active Apr 6, 2019
clang warning flags
View gist:3608547
You can’t perform that action at this time.