- http://www.wearebeef.co.uk | http://www.beefsource.co.uk
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
--- | |
extension: xml | |
layout: nil | |
dirty: true | |
filter: erb | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<% @pages.find(:all ).each do |page| -%> | |
<url> |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>Sniffer</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script> | |
<script type="text/javascript" charset="utf-8"> |
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 | |
# Unattended REE/Passenger installation | |
# Source: http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/ | |
# 15/03/09 Updated to use latest r.e.e. and passenger 2.1 and rewrote bits thanks to the comments left on my blog. Thanks guys | |
# 05/10/09 Update to use latest r.e.e. and passenger 2.2.5 (beef) | |
# 27/10/09 Update to use latest r.e.e. (beef) | |
# 23/11/09 Update to use latest passenger 2.2.7 (beef) | |
# 23/12/09 Using deb package rather the source | |
# 11/03/10 added new version of enterprise .deb |
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
<VirtualHost *> | |
<Directory /var/www/default/current/public> | |
Options FollowSymLinks | |
AllowOverride None | |
Order allow,deny | |
Allow from All | |
</Directory> | |
DocumentRoot /var/www/default/current/public | |
ServerName www.myapp.com |
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
# m h dom mon dow command | |
*/30 * * * * cd /var/www/default/current; /usr/bin/rake xapian:update_index RAILS_ENV=production | |
0 0 * * 7 cd /var/www/default/current; /usr/bin/rake xapian:rebuild_index models='Profile Job Diary Article' RAILS_ENV=production |
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
Geocode.all.each do |g| | |
begin | |
g.update_attributes( Geocode.geocoder.locate(g.query).attributes ) | |
rescue | |
g.destroy | |
end | |
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
# base_template.rb | |
run "echo TODO > README" | |
run "rm public/index.html" | |
generate :controller, "home index" | |
route "map.root :controller => 'home'" | |
run "cp config/environments/production.rb config/environments/staging.rb" | |
run "echo '\nstaging:\n production' >> config/database.yml" |
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
server { | |
listen 80; | |
server_name dev.myapp.com; | |
root /var/www/staging/current/public; | |
passenger_enabled on; | |
rails_env staging; | |
} | |
server { | |
listen 80; |
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 ActiveRecord::Base | |
protected | |
def self.construct_count_options_from_args(*args) | |
name_and_options = super | |
if name_and_options[0].is_a?(String) | |
if name_and_options[0].include?(',') | |
name_and_options[0] = "DISTINCT #{quoted_table_name}.#{primary_key}" | |
elsif name_and_options[0] =~ /\.\*$/ | |
name_and_options[0] = '*' | |
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
Scenario: Create an Article | |
Given I am on the new article page | |
When I fill in the article details | |
And I press "Save" | |
Then I should be on articles admin page | |
And I should see 'Article successfully created' | |
Scenario: Update a article | |
Given there are saved articles | |
And I am on the articles admin page |
OlderNewer