This file contains hidden or 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
# Allows you to use the :session key in your tests | |
# (when using rack-test). | |
# | |
# get "/", {}, :session => {:user => 1} | |
# | |
class Test::Unit::TestCase | |
include Rack::Test::Methods | |
def app | |
Sinatra::Application |
This file contains hidden or 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
Factory.define :application do |factory| | |
factory.attachment(:sample, "public/samples/sample.doc", "application/msword") | |
end |
This file contains hidden or 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
# == Using environment specific yaml fixtures as seed data in Rails 2.3.4 | |
# | |
# Setup your directory structure like below: | |
# | |
# -- RAILS_ROOT | |
# `-- db | |
# |-- seeds | |
# | |-- development | |
# | | |-- books.yml | |
# | | `-- users.yml |
This file contains hidden or 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: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx init.d script for Ubuntu 8.10 and lesser versions. | |
# Description: nginx init.d script for Ubuntu 8.10 and lesser versions. | |
### END INIT INFO |
This file contains hidden or 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 "httparty" | |
require "isbn" | |
module Book; end unless defined? Book | |
module Book::Search | |
include HTTParty | |
base_uri "books.google.com"; format :xml | |
class << self |
This file contains hidden or 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
namespace :config do | |
desc "Copy configuration files from templates" | |
task :copy do | |
for file in Dir.glob("config/*.tpl") do | |
system "cp -vi #{file} config/#{File.basename(file,".tpl")}" | |
end | |
end | |
end |
This file contains hidden or 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
namespace :db do | |
namespace :test do | |
desc "Write out a database.yml with settings for a test environment" | |
task :config do | |
File.open(Rails.root + "config/database.yml", "w") do |config| | |
config << <<-END_YAML.gsub(/^ {10}/, '') | |
development: | |
adapter: sqlite3 | |
database: db/development.sqlite3 | |
pool: 5 |
This file contains hidden or 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
# -- Export | |
require 'csv' | |
CSV.open('books.csv', 'w') do |file| | |
Book.all.each {|b| | |
file << [ | |
b.isbn, b.sku_number, b.title, | |
b.author_family, b.author_given, b.author, '', | |
b.edition, b.description, b.sale_price, | |
b.cover.try(:full_filename), |
This file contains hidden or 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
sass_dir = ask("Where would you like to keep your sass files within your project? (default: 'app/stylesheets')") | |
sass_dir = "app/stylesheets" if sass_dir.blank? | |
css_dir = ask("Where would you like Compass to store your compiled css files? (default: 'public/stylesheets')") | |
css_dir = "public/stylesheets" if css_dir.blank? | |
compass_command = "compass --rails . --css-dir=#{css_dir} --sass-dir=#{sass_dir} " | |
file 'vendor/plugins/compass/init.rb', <<-CODE | |
# This is here to make sure that the right version of sass gets loaded (haml 2.2) by the compass requires. |
This file contains hidden or 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/dep/tbb/include/tbb/tbb_machine.h b/dep/tbb/include/tbb/tbb_machine.h | |
index 0673f24..e17c2d4 100644 | |
--- a/dep/tbb/include/tbb/tbb_machine.h | |
+++ b/dep/tbb/include/tbb/tbb_machine.h | |
@@ -61,6 +61,8 @@ extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void ); | |
#include "machine/linux_intel64.h" | |
#elif __ia64__ | |
#include "machine/linux_ia64.h" | |
+#elif __powerpc__ | |
+#include "machine/mac_ppc.h" |