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
# I battled for hours trying to install imagick via macports, trying to follow various tutorials. | |
# If you've been battling with macports, completely uninstall everything related to | |
# macports (http://guide.macports.org/chunked/installing.macports.uninstalling.html) | |
# and trying with Home Brew instead, using the instructions below | |
# install brew (http://mxcl.github.com/homebrew/) | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
# install imagemagick |
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
/** Database Charset to use in creating database tables. */ | |
define('DB_CHARSET', 'utf8'); | |
/** The Database Collate type. Don't change this if in doubt. */ | |
define('DB_COLLATE', ''); | |
// ** MySQL settings - You can get this info from your web host ** // | |
switch ($_SERVER['SERVER_NAME']) { | |
case 'mysite.localhost': | |
define('DB_NAME', 'local_database_name'); |
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
/** | |
* Takes a date and calculates the start and end of the calendar week that it's in. | |
* Start will be 00:00:00 of the Monday of that calendar week, and end will be | |
* 00:00:00 of the Monday of the next calendar week (ie, just after the Sunday ends) | |
* | |
* @param string $date MySQL friendly date, with format "Y-m-d H:i:s" | |
* @return array - has two keys, 'start' and 'end' which are the boundaries of the calendar | |
* week, in MySQL format - ie, "Y-m-d H:i:s" | |
*/ | |
protected function _getWeekEndpoints($date){ |
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
function setUpTabs($tabContainer){ | |
$('.tab_links a', $tabContainer).click(function(){ | |
$('.tab_content', $tabContainer).hide(); | |
$('.tab_links a', $tabContainer).removeClass('current'); | |
$(this).addClass('current'); | |
var tabId = $(this).attr('href'); | |
//tabId = tabId.substr(1); // stip of the # from the front | |
window.location.hash = tabId; | |
$(tabId).show(); |
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 "bundler/capistrano" | |
require "rvm/capistrano" | |
#set :rvm_ruby_string, :local # from https://github.com/wayneeseguin/rvm-capistrano | |
set :rvm_type, :system # from http://stackoverflow.com/questions/5253153/rvm-error-with-deploying-rails-app-via-capistrano | |
default_run_options[:shell] = '/bin/bash --login' | |
set :application, "sneakerology_spree" | |
set :repository, "ssh://[email protected]/bbldigital/sneakerology-ecom.git" |
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 Player | |
def initialize | |
@max_health = 20 | |
@prev_health = @max_health | |
@rescued_behind = false | |
@half_health = @max_health / 2 | |
end | |
def play_turn(warrior) |
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
* executing "cd -- /var/www/vhosts/sneakerology.com.au/staging/releases/20131008015449 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile" | |
servers: ["sneakerology.com.au"] | |
[sneakerology.com.au] executing command | |
** [out :: sneakerology.com.au] rake aborted! | |
** [out :: sneakerology.com.au] Invalid route name, already in use: 'root' | |
** [out :: sneakerology.com.au] You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here: | |
** [out :: sneakerology.com.au] http://guides.rubyonrails.org/routing.html#restricting-the-routes-created | |
** [out :: sneakerology.com.au] /var/www/vhosts/sneakerology.com.au/staging/shared/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:409:in `add_route' | |
** [out :: sneakerology.com.au] /var/www/vhosts/sneakerology.com.au/staging/sh |
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
Bundler could not find compatible versions for gem "nokogiri": | |
In Gemfile: | |
spree (>= 0) ruby depends on | |
nokogiri (< 1.6.0, >= 1.4.4) ruby | |
spree (>= 0) ruby depends on | |
nokogiri (1.6.0) |
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 | |
// put this code in app/View/Layouts/ajax.ctp | |
echo $this->fetch('content'); | |
?> |
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
<IfModule mod_deflate.c> | |
# compress text, html, javascript, css, xml: | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript |
OlderNewer