Skip to content

Instantly share code, notes, and snippets.

View gamesthatgive's full-sized avatar

Kris gamesthatgive

View GitHub Profile
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
# 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)
@gamesthatgive
gamesthatgive / wufoo.css
Created November 17, 2010 19:33
Wufoo Theme Override
// 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;
}
# 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
#
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
#
# 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.