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
require 'capistrano/recipes/deploy/strategy/copy' | |
set :application, "YOUR APPLICATION NAME" | |
set :location, "YOUR DOMAIN (e.g. myapp.com)" | |
set :repository, "YOUR SOURCE CONTROL REPOSITORY" | |
set :user, "THE USER ON YOUR SERVER THAT WILL BE DEPLOYING" | |
set :local_user, "LOCAL USER" | |
set :database_name, "YOUR DATABASE NAME" | |
set :scm, SET WHAT SOURCE CONTROL METHOD YOU USE |
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
fastcgi_pass 127.0.0.1:8085; | |
fastcgi_param PATH_INFO $fastcgi_script_name; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; |
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
- (void)setSelected:(BOOL)isSelected | |
{ | |
[self setBackgroundColor:isSelected ? [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile:"Resources/screen-selection.png" size:CGSizeMake(1.0, 24.0)]] : nil]; | |
} |
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
// Couldn't just subclass because of the file scoped variables | |
/* | |
* CPTextField.j | |
* AppKit | |
* | |
* Created by Francisco Tolmasky. | |
* Copyright 2008, 280 North, Inc. | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public |
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
var WidgetJSON = @"WidgetJSON"; | |
@implementation Screen (CPCoding) | |
- (id)initWithCoder:(CPCoder)aCoder | |
{ | |
// This code will only work when this screen is in the main window - that should | |
// always be the case | |
var jsonObject = [aCoder decodeObjectForKey:WidgetJSON]; | |
return [[CPClassFromString(jsonObject.widgetType) alloc] initFromJSON:jsonObject]; | |
} |
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 <AppKit/CPView.j> | |
var CPTextFieldBlurFunction = nil; | |
// Code extended from code at http://gist.github.com/9848 | |
@implementation CPTextView : CPView | |
{ | |
DOMElement FIXME_textArea; | |
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
[Test for: ScreensPanel | |
beforeEach: function() { | |
this.window = [Mock a:CPWindow as:"" withStubs:nil]; | |
this.screensPanel = [[ScreensPanel alloc] initWithFrame:CGRectMake(0, 0, | |
ScreensPanelSize.width, | |
ScreensPanelSize.height) | |
parentEditView:nil]; | |
// This fails | |
// [this.screensPanel setWindow:this.window] | |
this.screensPanel._window = this.window; |
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
/* | |
* AppController.j | |
* NewApplication | |
* | |
* Created by You on July 5, 2009. | |
* Copyright 2009, Your Company All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> |
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
[Widget should: "expand to fit the new font size when the new font size is larger than the old, whether or not autosize is on" | |
by: function() { | |
for (var i = 0; i < this.widgetCount; ++i) { | |
this.widget = [[this.widgetList[i] alloc] init]; | |
this.oldSize = CGSizeMakeCopy([this.widget frame].size); | |
var font = [this.widget font], | |
newFont = [CPFont fontWithName:[font familyName] size:[font size]+1]; | |
[this.widget changeFont:newFont]; | |
[Widget should:"Be taller than before" by:function(context) { |
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 <AppKit/CPTextField.j> | |
var DelegateKey = @"DelegateKey"; | |
@implementation ToolbarTextField : CPTextField | |
{ } | |
- (void)initWithCoder:(CPCoder)aCoder | |
{ | |
console.log("Decoding..."); | |
self = [super initWithCoder:aCoder]; |