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
#!/bin/sh | |
# FindInFile.sh | |
# | |
# | |
# Created by Gregory Hill on 2/28/13. | |
# | |
# Usage: | |
# ./FindInFile.sh <baseDir> | |
# e.g. ~/Desktop/Code/Pandora/dev/Pandora |
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
#pragma mark - GCDAsyncSocketDelegate | |
- (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port { | |
[self secureSocket:sock]; | |
} | |
// We are connecting to server with self-signed certificate and don't include the certificate | |
// (public key .pem) in the client. So we skip all the cert checking. To actually check, see | |
// http://stackoverflow.com/questions/9874932/ssl-identity-certificate-to-run-an-https-server-on-ios | |
- (void)secureSocket:(GCDAsyncSocket *)sock { | |
// It has been changed in CocoaAsyncSocket v7.4, some old option keys are now unavailable and will throw exception. | |
// Use GCDAsyncSocketManuallyEvaluateTrust and evaluate in -socket:didReceiveTrust: delegate instead. |
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
#include <array> | |
#include <functional> | |
template <typename... T> | |
using common_type_t = typename std::common_type<T...>::type; | |
template <typename T> | |
using remove_cv_t = typename std::remove_cv<T>::type; | |
template <bool, typename T, typename... U> |
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
# (File moved to https://github.com/ole/Storyboard-Strings-Extraction) |
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
#include <boost/array.hpp> | |
namespace boost | |
{ | |
template<typename T> | |
inline boost::array<T, 0> | |
make_array() | |
{ | |
boost::array<T, 0> res; |
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
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
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> | |
int main(int argc, const char * argv[]) | |
{ | |
NSRunLoop * runLoop; | |
CLIMain * main; // replace with desired class | |
@autoreleasepool | |
{ | |
// create run loop |
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
@protocol APRemoteAddressBook <NSObject> | |
- (void) allPeople: (void (^)(NSArray *, NSError *)) reply; | |
- (void) mailingAddressesForPersonWithIdentifier: (NSString *) identifier | |
reply: (void (^)(NSArray *, NSError *)) reply; | |
- (void) emailAddressesForPersonWithIdentifier: (NSString *) identifier | |
reply: (void (^)(NSArray *, NSError *)) reply; | |
- (void) phoneNumbersForPersonWithIdentifier: (NSString *) identifier | |
reply: (void (^)(NSArray *, NSError *)) reply; | |
@end |
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
// Here is a traits structure I wrote to be able to determine if a function with | |
// a given name can be called in the context defined by a signature. This was | |
// originally not possible in C++03 - or at least a one solution works everywhere | |
// did not exist AFAIK. | |
// | |
// Olivier Grant | |
// | |
#include <iostream> | |
#include <iomanip> |
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
// Here are a few tricks I've used with the trunk versions of clang and libc++ | |
// with C++11 compilation turned on. Some might be obvious, some not, but at | |
// least they are some kind of improvement over their C++03 counterparts. | |
// | |
// Public domain. | |
// ============================================================================= | |
// 1) Using variadic class templates recursively, like in the definitions for | |
// "add<T...>" here: |