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
template(:rph) do | |
gem 'RedCloth' | |
gem 'mislav-will_paginate' | |
gem 'ruby-openid' | |
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git' | |
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git' | |
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git' | |
plugin 'open_id_authentication', :git => 'git://github.com/rails/open_id_authentication.git' | |
plugin 'hoptoad_notifier', :git => 'git://github.com/thoughtbot/hoptoad_notifier.git' |
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 'colored' | |
def banner(title, pad = 85) | |
puts "\n#{title} ".ljust(pad, "*").yellow | |
end | |
def stripe | |
puts ("-" * 84 + "\n").yellow | |
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
module States | |
def self.abbreviation_for(state) | |
LIST.invert[state] | |
end | |
def self.to_options | |
LIST.merge("--" => nil).sort | |
end | |
LIST = { |
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
// jQuery plugin: | |
// converts a float number as text in some element | |
// into US currency | |
// | |
// Ex: | |
// <span id="price">1234988.3400</span> | |
// | |
// $('span#price').toCurrency() | |
// => <span id="price">$1,234,988.34</span> | |
(function($) { |
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
// tooltip plugin for jQuery | |
(function($) { | |
$.fn.tooltip = function(options) { | |
var options = $.extend({ | |
xOffset: 30, | |
yOffset: 7, | |
follow: false | |
}, options) | |
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
// An unobtrusive Textile editor in jQuery | |
// Inspired by: http://slateinfo.blogs.wvu.edu/plugins/textile_editor_helper | |
// | |
// Usage: | |
// $(function() { | |
// $('textarea.textile').textilize(); | |
// )(jQuery); | |
// | |
(function($) { | |
$.textileEditor = function(textarea, options) { |
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
// global to store a reference | |
// to the timed autoplay slideshow | |
var autoplay = null | |
// Slideshow object | |
var Slideshow = { | |
inited: false, | |
// default settings when | |
// calling Slideshow.play() |
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
// Provides default text in a textbox that disappears when focused | |
// Note: also toggles an 'active' CSS class so you can change text color | |
(function($) { | |
$.fn.friendlyTextBox = function(msg) { | |
var regex = new RegExp('^' + msg + '$') | |
$(this).focus(function() { | |
if ($(this).val().match(regex)) $(this).val('') | |
$(this).addClass('active') |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: mongodb | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the mongodb data-store | |
# Description: starts mongodb using start-stop-daemon |
OlderNewer