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
def top_redirect_to(path) | |
render :layout => false, :partial => "shared/top_redirect", :object => path | |
end | |
%html | |
%head | |
%noscript | |
%meta{ "http-equiv" => "refresh", :content => "0;url=#{top_redirect}" }/ | |
%meta{ "http-equiv" => "window-target", :content => "_top" }/ | |
:javascript |
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
# in routes.rb | |
match '/oauth/create' => 'oauth#create', :as => 'oauth_callback' | |
resource :oauth, :only => :new, :controller => 'oauth' | |
# controller | |
class OauthController < ApplicationController | |
def new | |
session[:token] = nil | |
flash[:next] = params[:next] | |
top_redirect_to authenticator.authorize_url(:scope => params[:scope], :display => :page) |
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
// NOTE: this file is included remotely by wufoo iframe integration | |
// hide the big ugly error caption in the wufoo form since this increases height significantly in iframe | |
#errorLi { | |
display: none; | |
visibility: hidden; | |
} | |
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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby | |
# - a browser with WebSocket support | |
# | |
# Usage: | |
# ruby redis_pubsub_demo.rb | |
# |
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
check process web_delayed_job | |
with pidfile /var/run/engineyard/dj/web/dj.pid | |
start program = "/bin/su -c '/engineyard/bin/dj web start staging' - gtg" | |
stop program = "/bin/su -c '/engineyard/bin/dj web stop staging' - gtg" | |
group web_jobs |
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
# | |
# Cookbook Name:: delayed_job | |
# Recipe:: default | |
# | |
if %w(solo app app_master).include?(node[:instance_role]) | |
user = node[:owner_name] | |
framework_env = node[:environment][:framework_env] | |
# Be sure to replace APP_NAME with the name of your application. |