Skip to content

Instantly share code, notes, and snippets.

View cvasilak's full-sized avatar

Christos Vasilakis cvasilak

View GitHub Profile
@cvasilak
cvasilak / gist:643309
Created October 24, 2010 08:27
success output
casper:~ cvasilak$ which pkg-config
/usr/local/bin/pkg-config
casper:~ cvasilak$ brew install pango
Formula already installed: /usr/local/Cellar/pango/1.28.1
casper:~ cvasilak$ brew link pango
25 links created for /usr/local/Cellar/pango/1.28.1
casper:~ cvasilak$ brew install rrdtool
@cvasilak
cvasilak / gist:3851304
Created October 8, 2012 08:04 — forked from matzew/gist:3838816
FAQ or Wiki or ...
  • What is a pipeline ?

A pipeline represents a set of n connections to a server. The pipeline class offers some simple 'management' APIs to work with containing 'pipe' objects. Basically it allows you to add or remove new connections to the pipeline.

  • What is a pipe ?

A pipe represents one connection to a server. The pipe API is basically an abstraction layer for any server side connection, which all allows you to simply 'read' from, or 'write' to a server connection. However, technical details like RESTful APIs (e.g. HTTP PUT or HTTT GET) are not exposed on the pipeline and pipe APIs. In the future you can have different type of pipe objects (-> connections). The default (and CURRENTLY only supported) type is a REST connection.

Below is an example from our JavaScript lib:

#import <Foundation/Foundation.h>
@protocol AGEntity <NSObject>
@optional
-(NSDictionary*) mapping;
@end
@inteface Customer: NSOBject<AGEntity>
@interface Tweet : NSObject
@property(nonatomic, readonly) NSString *idStr;
@property(nonatomic, readonly) NSString *tweetText;
@property(nonatomic, readonly) User *userOwner;
@end
@interface Tweet : NSObject
@property(nonatomic, readonly) NSString *idStr;
@property(nonatomic, readonly) NSString *tweetText;
@property(nonatomic, readonly) User *userOwner;
@end
---
// generate token
_secret = @"XXXXXXX";
NSData *secretData = [AGBase32 base32Decode:_secret];
AGTotp _totp = [[AGTotp alloc] initWithSecret:secretData];
NSString *otp = [_totp generateOTP];
@cvasilak
cvasilak / gist:4327302
Created December 18, 2012 11:39
iOS Query & Paging

Further, initial work has been done to support quering and paging of the data. Currently implemented in the Pipeline using the readWithFilter method, will allow you to specify your query (where clause) and paging (limit/offset) requirements, which will then be passed on your remote endpoints to process. Work is in progess, to support quering and paging on the local DataStore, exploiting some of the fine mechanisms that the iOS provides (e.g. NSPredicate) and of course provide easier abstractions for our users to work with.

Quering and Paging is going to play an important role in the next couple of releases. Currently, there is an ongoing discussion in the mailing list, so if there is correct time to get involved it is now! We would be more than happy to hear your ideas and suggest

{"id":null,"firstName":null,"otp":null,"password":null,"email":null,"lastName":null,"uri":"otpauth://totp/john?secret=4DC6QJDTCHNQPOXE"}
{"id":null,"firstName":null,"otp":null,"password":null,"email":null,"lastName":null,"uri":"otpauth://totp/john?secret=4DC6QJDTCHNQPOXE"}
{"id":null,"firstName":null,"otp":null,"password":null,"email":null,"lastName":null,"uri":"otpauth://totp/john?secret=RLTKIYD2IPB6ETWZ"}{"id":null,"firstName":null,"otp":null,"password":null,"email":null,"lastName":null,"uri":"otpauth://totp/john?secret=RLTKIYD2IPB6ETWZ"}
xcodeproj 'AeroGear-iOS-Integration.xcodeproj'
platform :ios
pod 'AeroGear', :podspec => 'https://raw.github.com/aerogear/aerogear-ios/master/AeroGear.podspec'
target 'AeroGear-iOS-IntegrationTests', :exclusive => true do
pod 'Kiwi'
end