Skip to content

Instantly share code, notes, and snippets.

@wka
wka / gist:144043b4fb88c2c9368d
Created September 21, 2014 03:23
keybase.md

Keybase proof

I hereby claim:

  • I am wka on github.
  • I am wka (https://keybase.io/wka) on keybase.
  • I have a public key whose fingerprint is 9F3B 3721 4737 0046 D981 4370 3A3F 8E51 0CB3 D8BE

To claim this, I am signing this object:

@wka
wka / gist:0a5c742d2c24dc415656
Created September 5, 2014 16:30
Looking for strings in a binary from Optimizely's iOS SDK
> strings Optimizely | grep -i swizzle
_OBJC_CLASS_$_OptimizelySwizzler
_OBJC_METACLASS_$_OptimizelySwizzler
_OBJC_CLASS_$_OptimizelyCollectionSwizzler
_OBJC_METACLASS_$_OptimizelyCollectionSwizzler
AFSwizzleClassMethodWithClassAndSelectorUsingBlock
isSwizzled
shouldSwizzle
+[Optimizely doSwizzle]
+[Optimizely disableSwizzle]
@wka
wka / UIViewController+SetupConstraints.h
Created October 11, 2012 02:59
Easier use of constraintsWithVisualFormat:options:metrics:views: on UIViewControllers
#import <UIKit/UIKit.h>
@interface UIViewController (SetupConstraints)
- (void)setupConstraintsWithFormatStrings:(NSArray*)formatStringsArray;
@end
@wka
wka / playbackRate_bookmarklet.js
Created July 5, 2012 23:01
Change HTML5 video playbackRate bookmarklet
javascript:(function(){var newRate = prompt('Enter new video playback rate. Use numbers under 1 for slower than normal playback, above 1 for faster.'); for (var i = 0; i < document.getElementsByTagName('video').length; i++) { document.getElementsByTagName('video')[i].playbackRate = newRate } })();