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
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." | |
# environment settings | |
set-option -g default-shell /bin/zsh | |
set-environment -gu RBENV_VERSION | |
# set window index to start at 1 |
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 Quarterly | |
class ApplicableRecipientsForIssueQuery | |
def initialize(issue, relation=Spree::User) | |
@issue = issue | |
@relation = relation | |
end | |
def call | |
@relation | |
.joins(:subscriptions) |
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
cd $STACK_PATH | |
bundle exec appsignal notify_of_deploy -name="AppName" --environment=production --revision=`git log -1 --pretty=%H` --user=`git log -1 --pretty=%aN` |
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 'spec_helper' | |
module Spree | |
describe PaidOrderFactory do | |
let(:user){ create(:quarterly_user) } | |
let(:address){ create(:address) } | |
let(:variant) { | |
create(:variant) do |v| | |
v.product.update_attributes!({shipping_category: shipping_category}, without_protection: true) |
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
var assert = require('assert'), | |
Sails = require('sails'), | |
brarrels = require('barrels'); | |
before(function(done) { | |
Sails.lift({ | |
log: { | |
level: 'error' | |
}, | |
adapters: { |
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
<% if tracker = Spree::Tracker.current %> | |
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script> | |
<%= javascript_tag do %> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
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
fancy-ctrl-z () { | |
if [[ $#BUFFER -eq 0 ]]; then | |
fg | |
zle redisplay | |
else | |
zle push-input | |
zle clear-screen | |
fi | |
} | |
zle -N fancy-ctrl-z |
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 Quarterly | |
class CancelSubscriptionOrder | |
def subscription_canceled(sub, plan, user) | |
return unless sub.order | |
cancel_shipment(sub) | |
remove_line_item(sub) | |
cancel_order(sub) | |
cancel_payment_state(sub) | |
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
worker_processes Integer(ENV["WEB_CONCURRENCY"] || 7) | |
working_directory "#{ENV['STACK_PATH']}" | |
listen "/tmp/web_server.sock", :backlog => 64 | |
timeout 30 | |
pid '/tmp/web_server.pid' |
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
$redis = Redis.new(:url => ENV['REDIS_URL']) |