Skip to content

Instantly share code, notes, and snippets.

View cantonic's full-sized avatar

Can Edremitoglu cantonic

  • Berlin / Germany
View GitHub Profile
@cantonic
cantonic / gist:1730020
Created February 3, 2012 12:49
Error when installing spree 1.0
Mac:spree user$ cd mystock
Mac:mystock user$ rake db:create
Mac:mystock user$ rake db:migrate
Mac:mystock user$ spree install
Would you like to install the default blue theme? (yes/no) [yes] yes
Would you like to install the default gateways? (yes/no) [yes] yes
Would you like to run the migrations? (yes/no) [yes] yes
Would you like to load the seed data? (yes/no) [yes] yes
Would you like to load the sample data? (yes/no) [yes] yes
gemfile spree
rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;
if (!-e $request_filename)
{
rewrite ^(.+)$ /index.php?q=$1 last;
}
@cantonic
cantonic / gist:2627577
Created May 7, 2012 12:47
copy that into google translate, set to German and click the "Listen" button
pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
# mkdir -p is making sure that the directories are there for some SCM's that don't
# save empty folders
run <<-CMD
rm -rf #{latest_release}/log #{latest_release}/public/system #{latest_release}/tmp/pids &&
mkdir -p #{latest_release}/public &&
mkdir -p #{latest_release}/tmp &&
ln -s #{shared_path}/log #{latest_release}/log &&
set :stages, %w(production staging)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
require "bundler/capistrano"
set :scm, :git
set :repository, "[email protected]:name/repo.git"
set :migrate_target, :current
set :ssh_options, { :forward_agent => true }
set :stages, %w(production staging)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
require "bundler/capistrano"
set :scm, :git
set :repository, "[email protected]:user/repo.git"
set :migrate_target, :current
set :ssh_options, { :forward_agent => true }
@cantonic
cantonic / excercise_custom_factory_girl_steps.feature
Created July 14, 2012 03:15 — forked from chrisbloom7/excercise_custom_factory_girl_steps.feature
A modified version of the cucumber steps included in factory_girl, which will set an instance variable based on the factory/factories being generated. Drop this file into the features/support folder and don't require the original factory_girl/step_definit
# Assumes you have a factory named :customer defined with attributes first_name and last_name
Feature: Testing customized factory_girl step definitions
As an open source advocate
I
Want to make sure that my customized step definitions don't throw any errors
Scenario: Generating factories from a table
Given the following customers exist:
| first_name | last_name |
| Bob | Smith |
Spree::StaticContentController.class_eval do
def determine_layout
return @page.layout if @page and @page.layout.present? and not @page.render_layout_as_partial?
'layouts/my_layout'
end
end
eval(File.read(File.dirname(__FILE__) + '/common_cantonic_dependencies.rb'))
gem 'cantonic_core', :git => "[email protected]:cantonic/cantonic.git"
gem 'cantonic_cmd', :git => "[email protected]:cantonic/cantonic.git"
gemspec
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'