Skip to content

Instantly share code, notes, and snippets.

View yderidde's full-sized avatar

Yaniv De Ridder yderidde

  • Adobe Systems, Inc.
  • San Francisco
View GitHub Profile
// Oleg Andreev <oleganza@gmail.com>
#import <Foundation/Foundation.h>
@interface NSData (BTC)
// Init with securely random byte string from /dev/random
- (id) initRandomWithLength:(NSUInteger)length;
// Init with zero-terminated string in UTF-8 encoding.
@mbostock
mbostock / .block
Last active February 25, 2024 17:46
Closest Point on Path
license: gpl-3.0
@mattt
mattt / uiappearance-selector.md
Last active March 19, 2024 12:52
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \