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
before(:each) do | |
user = Factory.create(:user, :email => "[email protected]") | |
login_as(user) | |
@redis = mock("Redis", :null_object => true) | |
Redis.stub!(:new).and_return(@redis) | |
end | |
it "should add the params to a list for the current user" do | |
@redis.should_receive(:new) |
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 'rubygems' | |
require 'sinatra' | |
Sinatra::Application.default_options.merge!( | |
:run => false, | |
:env => ENV['RACK_ENV'] | |
) | |
get '/home/jpoz/wwc/public' do | |
"This does work" |
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
server { | |
listen 80; | |
server_name www.example.com alias example.com; | |
root /home/jpoz/wwc/public; | |
passenger_enabled on; | |
} |
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
@class UIGlassButton; | |
- (void)viewDidLoad { | |
UIGlassButton *myButton = [[UIGlassButton alloc] initWithFrame:CGRectMake(2,2,316,50)]; | |
[myButton addTarget:self action:@selector(doJunk:) forControlEvents:UIControlEventTouchDown]; | |
[myButton setTitle:@"Neat button!" forState:UIControlStateNormal]; | |
[myButton setTintColor:[UIColor colorWithWhite:0.20f alpha:1]]; | |
[self.view addSubview:myButton]; | |
} |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |
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
class Awesome < Application | |
def update | |
run_later do | |
Awesome.import_massive_junk | |
end | |
redirect(url(:sweet)) | |
end | |
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
describe Awesome do | |
it "should import_massive_junk" do | |
Awesome.should_recieve(:import_massive_junk) | |
dispatch_to(Awesome, :update) | |
end | |
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
describe Awesome do | |
it "should import_massive_junk" do | |
Awesome.should_receive(:import_massive_junk) | |
dispatch_to(Awesome, :update) | |
Merb::Dispatcher.work_queue.pop.call | |
end | |
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
require 'rubygems' | |
require 'sinatra' | |
require 'sinatra/recaptcha' | |
configure do | |
# https://admin.recaptcha.net/accounts/signup/ | |
Sinatra::ReCaptcha.public_key = 'your_public_key' | |
Sinatra::ReCaptcha.private_key = 'your_private_key' | |
# to use ssl set Sinatra::ReCaptcha.server = 'https://api-secure.recaptcha.net' | |
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
APNS.host = 'gateway.push.apple.com' | |
# gateway.sandbox.push.apple.com is default | |
APNS.pem = '/path/to/pem/file' | |
APNS.pass = 'secret' | |
# openssl pkcs12 -in cert.p12 -out cert.pem -nodes -clcerts | |
APNS.port = 2195 | |
# this is also the default. Shouldn't ever have to set this, but just in case Apple goes crazy, you can. |
OlderNewer