Skip to content

Instantly share code, notes, and snippets.

View leemcalilly's full-sized avatar

Lee McAlilly leemcalilly

View GitHub Profile
@leemcalilly
leemcalilly / gist:4332756
Created December 18, 2012 22:41
app/views/layouts/application.html.erb
<!DOCTYPE html>
<%= render '/refinery/html_tag' %>
<%= render '/refinery/head' %>
<body>
<%= render '/refinery/ie6check' if request.env['HTTP_USER_AGENT'] =~ /MSIE/ -%>
<div id="page_container">
<header id="header">
<%= render '/refinery/header' -%>
</header>
@leemcalilly
leemcalilly / gist:4332534
Created December 18, 2012 22:10
views/refinery/pages/home.html.erb
<div class="row">
<div class="span8">
<%= raw @page.content_for(:intro) %>
</div>
<div class="span4">
<%= raw @page.content_for(:quote) %>
</div>
</div>
@leemcalilly
leemcalilly / appassetsjavascriptsapplication.js
Created December 6, 2012 16:50
Checklist of File Changes for Setting up Refinery CMS with Twitter Bootstrap
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
/*-----------------------------------------------------------------------------------*/
/* Load responsive IE scripts */
/*-----------------------------------------------------------------------------------*/
add_action( 'wp_footer', 'woo_load_responsive_IE_footer', 10 );
if ( ! function_exists( 'woo_load_responsive_IE_footer' ) ) {
function woo_load_responsive_IE_footer () {
$html = '';
@leemcalilly
leemcalilly / gist:2388380
Created April 14, 2012 22:53
How to find out everything you can override in a refinerycms project
cd /tmp
refinerycms bar
cd bar
git init .
git add .
git commit -a -m "Hide these files"
rake refinery:override view=**/*
rake refinery:override controller=**/*
rake refinery:override model=**/*
git add -N .
[AchieveNext] (master) $ heroku logs
2012-03-01T18:42:17+00:00 heroku[router]: GET www.achievenext.com/assets/bg_texture-bc963f74085f7a5b271aebb2107869d9.png dyno=web.1 queue=0 wait=0ms service=7ms status=200 bytes=39593
2012-03-01T18:42:17+00:00 app[web.1]: cache: [GET /assets/an_logo-efbb6561627407d37d5a7da2e44481e3.png] miss
2012-03-01T18:42:17+00:00 heroku[nginx]: 24.150.183.184 - - [01/Mar/2012:18:42:17 +0000] "GET /assets/bg_texture-bc963f74085f7a5b271aebb2107869d9.png HTTP/1.1" 200 39593 "http://www.achievenext.com/" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19" www.achievenext.com
2012-03-01T18:42:17+00:00 heroku[router]: GET www.achievenext.com/assets/an_logo-efbb6561627407d37d5a7da2e44481e3.png dyno=web.1 queue=0 wait=0ms service=11ms status=200 bytes=30740
2012-03-01T18:42:17+00:00 heroku[nginx]: 24.150.183.184 - - [01/Mar/2012:18:42:17 +0000] "GET /assets/an_logo-efbb6561627407d37d5a7da2e44481e3.png HTTP/1.1" 200 30740 "http://www.achievene
unless RAILS_ENV == "development"
before_filter :add_www_subdomain
end
private
def add_www_subdomain
unless /^www/.match(request.host)
redirect_to("#{request.protocol}www.achievenext.com#{request.request_uri}",
:status => 301)
@leemcalilly
leemcalilly / gist:1685244
Created January 26, 2012 21:31
CFO Alliance Homepage Outline

Name & Branding (Logo)

Intro

  • Tagline - Sharing knowledge with people you trust (Or… Voice of the Middle Market CFO) The CFO Alliance is an exclusive community for finance leaders and decision makers.
  • Join Now button

Main Nav

  • Sign In
  • Join
@leemcalilly
leemcalilly / gist:1677385
Created January 25, 2012 17:16
Sample App Routes
[supply_side] (master) $ rake routes
logout GET /logout(.:format) sessions#destroy
login GET /login(.:format) sessions#new
signup GET /signup(.:format) users#new
activate_user GET /users/:id/activate(.:format) users#activate
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
@leemcalilly
leemcalilly / gist:1677265
Created January 25, 2012 16:54
it "successfully links to the login page"
it "successfully links to the login page" do
visit root_path
click_link "Log In"
save_and_open_page
end