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
#import <Foundation/Foundation.h> | |
#import <HTTPKit/HTTP.h> | |
#import <dispatch/dispatch.h> | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
HTTP *http = [HTTP new]; | |
http.enableDirListing = YES; | |
// Simple "Hello you!" pong |
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
@{ | |
@"AED": { @"code": @784, @"e": @2 }, | |
@"AFN": { @"code": @971, @"e": @2 }, | |
@"ALL": { @"code": @008, @"e": @2 }, | |
@"AMD": { @"code": @051, @"e": @2 }, | |
@"ANG": { @"code": @532, @"e": @2 }, | |
@"AOA": { @"code": @973, @"e": @2 }, | |
@"ARS": { @"code": @032, @"e": @2 }, | |
@"AUD": { @"code": @036, @"e": @2 }, | |
@"AWG": { @"code": @533, @"e": @2 }, |
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
#import <ObjFW/ObjFW.h> | |
@interface OFBuffer : OFObject { | |
size_t _length, _capacity; | |
void *_bytes; | |
BOOL _externalStorage, _freeWhenDone; | |
} | |
// This pointer is only guaranteed to be valid as long as the | |
// OFBuffer object remains unchanged. | |
@property(readonly) void *bytes; |
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
#import <Foundation/Foundation.h> | |
#define AN_ENUM \ | |
MEMBER(foo) \ | |
MEMBER(bar) | |
typedef enum { | |
#define MEMBER(name) name, | |
AN_ENUM | |
#undef MEMBER |
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
# Compile localized nibs | |
require "tmpdir" | |
xib_dir = "#{ENV["PROJECT_DIR"]}/.../ja.lproj" | |
str_dir = "#{ENV["PROJECT_DIR"]}/.../en.lproj" | |
out_dir = "#{ENV["BUILT_PRODUCTS_DIR"]}/.../en.lproj" | |
Dir.mktmpdir do |tmpdir| | |
Dir.foreach xib_dir do |xib_name| | |
if File.extname(xib_name) == ".xib" |
Ident | Hardware |
---|---|
iPhone1,1 | iPhone 1G, M68 |
iPhone1,2 | iPhone 3G, N82 |
iPhone2,1 | iPhone 3GS, N88 |
iPhone3,1 | iPhone 4/AT&T, N89 |
iPhone3,2 | iPhone 4/Other Carrier?, ?? |
iPhone3,3 | iPhone 4/Verizon, TBD |
iPhone4,1 | (iPhone 4S/GSM), TBD |
iPhone4,2 | (iPhone 4S/CDMA), TBD |
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
____ __ | |
_____ _____ | |
___ ___ | |
__ __ ______ __ | |
__ __ __ ___ __ __ ____ _ _____ _____ __ __ | |
__ ______ ___ __ _ __ __ __ __ __ ___ __ __ | |
__ __ ________ __ __ __ __ __ __ _ ___ | |
___ __ ____ ____ __ __ __ ___ _ | |
____ ____ __ | |
___ ____ |
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
import "math" | |
import "AppKit" | |
import "QuartzCore" | |
nsapp = NSApplication sharedApplication | |
a = CALayer new setDoubleSided: yes; | |
setBackgroundColor: CGColorCreateGenericRGB(1,0,0,1); | |
self | |
b = CALayer new setDoubleSided: yes; |