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
<!-- for some reason this isn't receiving my style! --> | |
<pre class="tl-body viewsource"><%= foo.bar %></pre> |
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
# 1) Point *.example.com in your DNS setup to your server. | |
# | |
# 2) Setup an Apache vhost to catch the star pointer: | |
# | |
# <VirtualHost *:80> | |
# ServerName *.example.com | |
# </VirtualHost> | |
# | |
# 3) Set the current account from the subdomain | |
class ApplicationController < ActionController::Base |
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
#!/usr/bin/env ruby | |
# Written by Coda Hale <[email protected]>. MIT License. Go for it. | |
def include_pattern(filename) | |
core = filename.gsub(/_spec/, "").gsub(/\Aspec\//, "") | |
return Regexp.quote(core) | |
end | |
if ARGV.empty? || ARGV == ["--help"] || ARGV == ["-h"] | |
STDERR.puts("Usage:") |
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
var DateHelper = { | |
// Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time | |
// Ruby strftime: %b %d, %Y %H:%M:%S GMT | |
time_ago_in_words_with_parsing: function(from) { | |
var date = new Date; | |
date.setTime(Date.parse(from)); | |
return this.time_ago_in_words(date); | |
}, | |
time_ago_in_words: function(from) { |
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
#### Example of CruiseControl.rb cruise_config.rb which dynamically picks #### | |
#### the version of Rails to use based on CCRB project name #### | |
# cruise_config.rb: | |
require 'fileutils' | |
Project.configure do |project| | |
project.email_notifier.emails = ["chad+sandbox-ci-#{Socket.gethostname.chomp.downcase}@mycompany.com"] | |
require "#{File.dirname(__FILE__)}/vendor/plugins/shared_stuff/lib/cruise/mycompany_cruise_config.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
### Mailer configuration from config/environments/production.rb | |
# Documnentation: | |
# * http://wiki.rubyonrails.com/rails/pages/HowToSendEmailsWithActionMailer | |
# * http://api.rubyonrails.org/classes/ActionMailer/Base.html | |
# Let MTA handle deliveries asynchronously, rather than using default synchronous SMTP | |
config.action_mailer.delivery_method = :sendmail | |
# Let MTA handle errors, do not raise exceptions |
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
/* | |
* The MIT License | |
* | |
* Copyright (c) 2009 James F. Herdman | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
#!/usr/bin/env ruby | |
# | |
# usage: script/server_restarter | |
# | |
# Rails autoloading, while nice in theory, frequently doesn't work. Since Rails 2.3+ | |
# is so fast when completely reloading the server, I wrote this script to listen to the | |
# given directories, and kill/restart the server when any file is changed. | |
# | |
# It's quick, simple, and it reliably reloads your application when changes are made. | |
# |
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
task :integrity => ['config/database.yml', 'test'] | |
file 'config/database.yml' do | |
cp 'config/database.yml.sample', 'config/database.yml' | |
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
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb | |
index cba8e59..af53ec2 100644 | |
--- a/app/controllers/issues_controller.rb | |
+++ b/app/controllers/issues_controller.rb | |
@@ -139,6 +139,7 @@ class IssuesController < ApplicationController | |
if request.get? || request.xhr? | |
@issue.start_date ||= Date.today | |
+ @issue.inspire_on(params[:inspire_on]) if params[:inspire_on] | |
else |
OlderNewer