This file contains 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
PHFetchResult *result = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum | |
subtype:PHAssetCollectionSubtypeSmartAlbumUserLibrary | |
options:nil]; | |
PHAssetCollection *assetCollection = result.firstObject; | |
NSLog(@"%@", assetCollection.localizedTitle); | |
// Camera Roll |
This file contains 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 | |
infix operator +=! { associativity right precedence 90 } // Int32 or Int64 | |
infix operator -=! { associativity right precedence 90 } // Int32 or Int64 | |
postfix operator ++! {} // Int32 or Int64 | |
postfix operator --! {} // Int32 or Int64 | |
infix operator |=! { associativity right precedence 90 } // UInt32 | |
infix operator &=! { associativity right precedence 90 } // UInt32 |
This file contains 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
@interface NSObject (Debounce) | |
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay; | |
@end |
This file contains 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
// | |
// libuuid sample program | |
// | |
// library install for debian | |
// $ sudo apt-get install uuid-dev | |
// | |
// compile | |
// $ gcc uuid_test.c -luuid -o uuid_test | |
// | |
#include <stdio.h> |
This file contains 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
// https://gist.github.com/1964797 | |
var express = require('express'); | |
var sys = require('util'); | |
var oauth = require('oauth'); | |
var app = express(); | |
var _twitterConsumerKey = 'sLNC1nUodJom3L8BNL4iHA'; | |
var _twitterConsumerSecret = 'EcO8Iiv5M8R0qeLVbHAi2cm9uX4Fp1jPODnoGfqUEro'; |
This file contains 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
/* | |
Node.js, express, oauth example using Twitters API | |
Install Node.js: | |
curl -0 http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz | |
tar -zxf node-v0.6.11.tar.gz | |
cd node-v0.6.11 | |
./configure | |
make | |
make install |
NewerOlder