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 | |
docker stop $(docker ps -a -q) | |
docker rm -f $(docker ps -a -q) | |
docker volume prune -f | |
docker network prune -f |
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/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
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
# with my git configuration the spree repo was giving me issues with line endings | |
# this fixed the issue for me: marking a file as binary causes git to ignore it completely | |
core/vendor/assets/javascripts/jquery.alerts/jquery.alerts.css.erb binary | |
core/vendor/assets/javascripts/jquery.alerts/jquery.alerts.js binary | |
core/vendor/assets/javascripts/jquery.jstree/themes/apple/style.css binary | |
sample/db/sample/spree/line_items.yml binary | |
sample/db/sample/spree/products.yml binary |
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
load 'deploy/assets' | |
namespace :deploy do | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
%x{bundle exec rake assets:precompile} | |
%x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}} | |
%x{bundle exec rake assets:clean} | |
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
module Resque | |
def self.unregister_workers_for_host(host) | |
Resque.workers.select{|worker| worker.id.split(':').first==host}.each(&:unregister_worker) | |
end | |
end | |
Resque.unregister_workers_for_host("ip-10-250-192-51") |
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
#!/usr/bin/env zsh | |
# 1304046900 TRACKS CHANGES TO RAILS' APP SKELETON SINCE A GIVEN VERSION | |
# To be placed in the root of your app. | |
old_version="3.1.3" | |
# Exit on failure | |
# |
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
#!/usr/bin/env zsh | |
# 1304046900 TRACKS CHANGES TO PARTS OF SPREE SINCE A GIVEN COMMIT | |
# To be placed in the root of your app. | |
old_commit="32483802d823e92c0746d080217870dd48f49307" | |
parts=( | |
core/app/assets/javascripts/store/checkout.js |
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
module Spree | |
class Calculator::Bogo < Calculator | |
preference :number_to_buy, :integer, :default => 1 | |
preference :number_to_get, :integer, :default => 1 | |
def self.description | |
"Buy One Get One" | |
end | |
def compute(order) |
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/sh | |
## you'll have to do a couple extra steps to get this running | |
## there are probably other ways to handle svncanboot, but this is from the linux forum | |
set -e | |
if | |
touch /etc/_testr_file | |
then |
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
#!/usr/bin/env zsh | |
# 1304046900 TRACKS CHANGES TO RAILS' APP SKELETON SINCE A GIVEN VERSION | |
old_version="3.1.1" | |
# Exit on failure | |
# | |
set -e |
NewerOlder