I hereby claim:
- I am TongG on github.
- I am tongguo (https://keybase.io/tongguo) on keybase.
- I have a public key whose fingerprint is EAD7 A5A3 EDD8 10CC C244 2C09 6AC5 99D1 AC35 C4FA
To claim this, I am signing this object:
OSStatus resultCode = errSecSuccess; | |
// Attributes that will be used for constructing search criteria | |
char* label = "secure.imdb.com"; | |
SecProtocolType* ptrProtocolType = malloc( sizeof( SecProtocolType ) ); | |
*ptrProtocolType = kSecProtocolTypeHTTPS; | |
SecKeychainAttribute attrs[] = { { kSecLabelItemAttr, ( UInt32 )strlen( label ), ( void* )label } | |
, { kSecProtocolItemAttr, ( UInt32 )sizeof( SecProtocolType ), ( void* )ptrProtocolType } | |
}; |
NSError* error = nil; | |
// Create an empty keychain with given passphrase | |
WSCKeychain* emptyKeychain = [ [ WSCKeychainManager defaultManager ] | |
createKeychainWithURL: [ [ [ NSBundle mainBundle ] bundleURL ] URLByAppendingPathComponent: @"EmptyKeychainForWiki.keychain" ] | |
passphrase: @"waxsealcore" | |
becomesDefault: NO | |
error: &error ]; | |
// You have no need for managing the memory manually, |
OSStatus resultCode = errSecSuccess; | |
SecKeychainRef secEmptyKeychain = NULL; | |
NSURL* URL = [ [ [ NSBundle mainBundle ] bundleURL ] URLByAppendingPathComponent: @"EmptyKeychainForWiki.keychain" ]; | |
char* passphrase = "waxsealcore"; | |
// Create an empty keychain with given passphrase | |
resultCode = SecKeychainCreate( URL.path.UTF8String | |
, ( UInt32 )strlen( passphrase ) | |
, ( void const* )passphrase | |
, ( Boolean )NO |
find . "(" -name "*.h" -or -name "*.m" -or -name "*.mm" -or -name "*.hpp" -or -name "*.cpp" -or -name "*.c" -or -name "*.cc" ")" -print0 | xargs -0 wc -l |
I hereby claim:
To claim this, I am signing this object:
# appledoc Xcode Integration Script | |
/usr/local/bin/appledoc \ | |
--project-name "${PROJECT_NAME}" \ | |
--project-company " Tong Guo" \ | |
--company-id "individual.TongGuo" \ | |
--docset-atom-filename "${company}.atom" \ | |
--docset-feed-url "${companyURL}/${company}/%DOCSETATOMFILENAME" \ | |
--docset-package-url "${companyURL}/${company}/%DOCSETPACKAGEFILENAME" \ | |
--docset-fallback-url "${companyURL}/${company}" \ |
#define COMPARE_WITH_CASE_INSENSITIVE( _Lhs, _Rhs ) \ | |
( [ _Lhs compare: _Rhs options: NSCaseInsensitiveSearch ] == NSOrderedSame ) \ | |
BOOL isCharInAtoE( NSString* ); | |
NSUInteger mapHexAlphaToDecimalNumeric( NSString* _AlphaInHexNumeric ); | |
NSUInteger OMCOperandConvertHexToDecimal( NSString* _HexNumeric ) | |
{ | |
NSString* prefixForHex = @"0x"; | |
if ( ![ _HexNumeric hasPrefix: prefixForHex ] ) |
id ( *IMP )( id, SEL, ... ) |
// NSDate + GTDebugForNSDate | |
@interface NSDate ( GTDebugForNSDate ) | |
+ ( instancetype ) debug_dateWithString: ( NSString* )_String; | |
@end | |
@implementation NSDate ( GTDebugForNSDate ) | |
+ ( instancetype ) debug_dateWithString: ( NSString* )_String | |
{ | |
if ( [ _String isEqualToString: @"1997-01-28 19:22:34 +0600" ] ) | |
NSLog( @"Happy birthday, Tong Guo!" ); |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0 0.501961 1 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Courier - 10.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>1 0.501961 0 1</string> |