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
<p> | |
<a href="/signup/" class="multiline_button blue" style="width: 245px"> | |
<big>Start Free Trial</big> | |
<small>30-days free! Signup in 60 seconds</small> | |
</a> | |
</p> | |
<p> | |
<a href="/signup/" class="multiline_button brown" style="width: 245px"> | |
<big>Start Free Trial</big> |
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
## based on the example at: | |
## http://gist.github.com/17371 | |
## | |
## put me in lib/un_haml.rb (in the haml-based project) | |
## | |
## call me on the command line thus: | |
## $ script/runner UnHaml app/views/layouts/application.html.haml | |
## $ script/runner UnHaml */*/*/*.haml | |
## | |
class UnHaml < Haml::Engine |
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
# How to re-use the menu partial for a submenu in Refinery CMS >= 0.9.8.5 | |
# header menu (main menu) which hides its children. | |
<%= render :partial => "/shared/menu", | |
:locals => { | |
:dom_id => 'menu', | |
:css => 'menu', | |
:collection => @menu_pages, | |
:hide_children => true | |
} -%> |
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
# shoestring.rb | |
# Rails template | |
# from Judd Kussrow of Octopus Inc | |
# $ rails new Project -Jm http://octopusinc.com/shoestring.rb | |
################################### MAINTENANCE ###### | |
gem 'rails3-generators', :group => 'development' | |
gem 'nifty-generators', :group => 'development' |
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
rendering a custom plugin | |
<% content_for :page_title do %> | |
<%= @destination.title %> | |
<% end %> | |
<% content_for :page_body do %> | |
<section> | |
<h1>Choose from our most popular recommended itineraries below</h1> | |
</section> |
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
rendering a custom plugin | |
<% content_for :page_title do %> | |
<%= @destination.title %> | |
<% end %> | |
<% content_for :page_body do %> | |
<section> | |
<h1>Choose from our most popular recommended itineraries below</h1> | |
</section> |
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
# features/support/missing_translations.rb | |
missing_translations = [] | |
After do |scenario| | |
temp = all('.translation_missing') | |
if temp.any? | |
missing_translations << temp.to_a | |
raise "Missing Translation" | |
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
ENV["WATCHR"] = "1" | |
system 'clear' | |
puts 'watching ...' | |
def notify(message) | |
title = "Watchr Test Results" | |
message.gsub!("No DRb server is running. Running in local process instead ...", "") | |
puts message | |
is_passing = message.match(/\s0\s(errors|failures)/) ? true : false |
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
#cd ~ | |
#sudo apt-get update | |
#sudo apt-get install openjdk-7-jre-headless -y | |
# Download the compiled elasticsearch rather than the source. | |
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
sudo mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
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
# lib/omniauth/facebook.rb | |
require 'httparty' | |
module Omniauth | |
class Facebook | |
include HTTParty | |
# The base uri for facebook graph API | |
base_uri 'https://graph.facebook.com/v2.3' |
OlderNewer