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
# DESCRIPTION: Cap task to setup the current directory as git repository and then create and push to a remote repository via ssh. | |
# | |
# INSTALL: Copy to home directory as ~/.caprc | |
# RUN: cap git:setup scm=t | |
# If it's a Rails app run | |
# RUN: cap git:setup scm=t railsapp=t | |
# | |
# AUTHOR: Andy Henson (http://www.elaptics.co.uk) based on code by Geoffrey Grosenbach http://peepcode.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
set :application, "appname" | |
set :repository, "git@github.com:username/project.git" | |
# If you aren't deploying to /u/apps/#{application} on the target | |
# servers (which is the default), you can specify the actual location | |
# via the :deploy_to variable: | |
set :deploy_to, "/var/apps/#{application}" | |
set :scm, :git | |
set :branch, "master" |
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
set :typo3_local_folders, %W(fileadmin typo3temp uploads) | |
set :typo3_source, %W(index.php t3lib typo3) | |
namespace :deploy do | |
desc "Set up the expected application directory structure on all boxes" | |
task :setup, :except => { :no_release => true } do | |
sudo <<-CMD | |
mkdir -p #{deploy_to} #{releases_path} #{shared_path} | |
CMD | |
typo3_local_folders.each do |asset| |
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
<?php | |
$TYPO3_CONF_VARS['SYS']['sitename'] = 'The Site Name [DEV]'; | |
// Default password is "joh316" : | |
$TYPO3_CONF_VARS['BE']['installToolPassword'] = 'bacb98acf97e0b6112b1d1b650b84971'; | |
$typo_db_extTableDef_script = 'extTables.php'; | |
require '/full/path/to/the/project/config/db_settings.php'; |
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
=== Epic Snow Leopard Upgrayyyyd Guide === | |
Son, you’re now living in the land of 64-bit systems. | |
That means that some of your 32-bit shit is now broken. | |
Not all is lost. | |
== Fixing MySQL weirdness |
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
=== Epic Snow Leopard Upgrayyyyd Guide === | |
Son, you’re now living in the land of 64-bit systems. | |
That means that some of your 32-bit shit is now broken. | |
Not all is lost. | |
== Fixing MySQL weirdness |
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
Surround these with : e.g. :calling: | |
+1 | |
-1 | |
bulb | |
calling | |
clap | |
cop | |
feet |
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
Gem::Specification.new do |s| | |
s.name = 'calculate_vat' | |
s.version = '0.1.1' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Andy Henson' | |
s.email = 'andy@elaptics.co.uk' | |
s.summary = 'Calculate VAT stuff!' | |
s.description = 'Calculates UK VAT type stuff' | |
s.files = ['calculate_vat.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
class CreditCard < ActiveRecord::Base | |
attr_accessible :bank, :benefit_earn_rate, :benefit_type, :benefit_value, :interest, :name, :brand, | |
:goal_name, :goal_cost, :goal_value | |
def goal | |
self.goal_cost.to_f / self.goal_value.to_f | |
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
class SlidesController < ApplicationController | |
respond_to :html, :json, :pdf | |
def index | |
@slides = Slide.order("position") | |
respond_with(@slides) | |
end | |
def show | |
@slide = Slide.find(params[:id]) |
OlderNewer