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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
require 'guard/guard' | |
module ::Guard | |
class Minitest < ::Guard::Guard | |
def run_all | |
true | |
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
require 'rubygems' | |
require 'minitest/unit' | |
require 'colored' | |
module MiniTest | |
class SpecRunner < Unit | |
def before_suites | |
super if defined?(super) | |
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
class Bob | |
def self.blocky | |
yield | |
end | |
end | |
module Death | |
def call_blocky | |
Bob.blocky do | |
puts self |
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
def facebook_like_button | |
"<iframe src='http://www.facebook.com/plugins/like.php?href=#{request.url}&layout=standard&show_faces=false&width=450&action=like&font=arial&colorscheme=light&height=35' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:450px; height:35px;' allowTransparency='true'></iframe>" | |
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
/* | |
Include browser-specific css here. This file should be included in the main css file as well as ie.css. | |
This way PIE can apply itself to any css3 items that have been used. | |
add @import pie_option; to allow SASS to toggle it on for IE and off for everyone else. | |
*/ |
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
// File is in /app/stylesheets/includes/_setup.css.scss | |
//////////////////////////////////////////////// | |
// Import Blueprint defaults | |
//////////////////////////////////////////////// | |
@import "blueprint/grid"; | |
@import "blueprint/typography"; | |
@import "blueprint/form"; | |
@import "blueprint/interaction"; | |
@import "blueprint/debug"; |
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
RAILS_ROOT = ENV['RAILS_ROOT'] || File.expand_path(File.dirname(File.dirname(__FILE__))) | |
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | |
begin | |
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | |
rvm_lib_path = File.join(rvm_path, 'lib') | |
$LOAD_PATH.unshift rvm_lib_path | |
require 'rvm' | |
RVM.use_from_path! RAILS_ROOT | |
rescue LoadError |
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/bash -e | |
# | |
# Since unicorn creates a new pid on restart/reload, it needs a little extra love to | |
# manage with runit. Instead of managing unicorn directly, we simply trap signal calls | |
# to the service and redirect them to unicorn directly. | |
# | |
# To make this work properly with RVM, you should create a wrapper for the app's gemset unicorn. | |
# | |
function is_unicorn_alive { |
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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
guard 'rspec', :version => 2, | |
:cli => '--colour --drb --format documentation --fail-fast', | |
:all_after_pass => false, | |
:all_on_start => false, | |
:keep_failed => false, | |
:notify => true do | |
watch(%r{^spec/.+_spec\.rb$}) |
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 'zlib' | |
class AnyMailer < ActionMailer::Base | |
def enqueue(method, *args) | |
message = self.send(method, *args) | |
Resque.enqueue(MailWorker, message: compressed_msg(message)) | |
end |
OlderNewer