Skip to content

Instantly share code, notes, and snippets.

View nickjs's full-sized avatar

Nicholas J. Small nickjs

View GitHub Profile
listFor: function(opts) {
var recordType = opts.recordType ;
var resource = recordType.resourceURL() ; if (!resource) return false ;
// TODO: check if the user has given a path to a view.
// if so, call that view (with Method: GET)
var url = resource + "/_temp_view"
var content = {}
var context = {
+ (void)checkSignIn:(CPString)email password:(CPString)password delegate:(id)aDelegate
{
var request = [CPURLRequest requestWithURL:"http://localhost:3000/authenticate"];
[request setHTTPMethod:"POST"];
[request setHTTPBody:"{'email':'"+email+"','password':'"+password+"'}"];
var authenticate = [CPURLConnection connectionWithRequest:request delegate:aDelegate];
[authenticate start];
console.log("working")
}
var cookie = [[CPCookie alloc] initWithName:'le_auth'];
var token = data.user.auth_token;
var myDate=new Date();
[cookie setValue:token expires:myDate domain:'localhost'];
console.log(token);
console.log([cookie value]);
var LEDefaultContentWindow
@implementation LEContentWindow : CPWindowController
{
LEButtonTabs tabSet;
}
+ (LEContentWindow)defaultWindow
{
if(!LEDefaultContentWindow)
LEDefaultContentWindow = [[LEContentWindow alloc] init];
@implementation LEProfilesController : CPObject
{
CPDictionary profiles;
CPArray observers;
}
+ (LEProfilesController)defaultController
{
if(!LEDefaultProfilesController)
LEDefaultProfilesController = [[LEProfilesController alloc] init];
@implementation LEStack : CPView
{
CPDictionary collection;
CPCollectionView grid;
}
- (LEStack)initWithOrigin:(CGPoint)aPoint
{
self = [super initWithFrame:CGRectMake(0,0,500,500)];
- (void)collectionViewDidChangeSelection:(CPCollectionView)collectionView
{
[self setHidden:YES];
}
{
"sources" : [
{
"type" : "git",
"path" : "git://github.com/280north/cappuccino.git",
"parts" : [
{
"src" : "Objective-J",
"dst" : "Frameworks/Objective-J",
"build" : "ant -DBuild=BUILD_PATH",
@implementation AppController : CPObject
{
CPWindow _rootWindow;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
_rootWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask];
[_rootWindow orderFront:self];
@implementation LEValueAnimation : CPAnimation
{
CPView _view;
CPString _keyPath;
}
- (LEAnimation)initWithView:(CPView)aView keyPath:(NSString)keyPath
{
self = [super initWithDuration:1.0 animationCurve:CPAnimationLinear];
if(self)