As configured in my dotfiles.
start new:
tmux
start new with session name:
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| require 'csv' | |
| namespace :quarterly do | |
| desc 'CSV Up A Date Range of Cancelations' | |
| task :cancelation_csv do |t, args| | |
| s_date, e_date = DateTime.parse('jan 1, 2014'), DateTime.parse('jan 31, 2014') | |
| binding.pry | |
| build_csv(s_date, e_date) | |
| d_date, m_date = DateTime.parse('jan 14, 2014'), DateTime.parse('jan 20, 2014') | |
| build_csv(d_date, m_date) | |
| end |
| / The values should loop from 1 to whatever | |
| / Categories are pulled from the DB | |
| .section.container.home-curators | |
| %h3.section-title | |
| \Popular curators: | |
| .home-selecter | |
| %select.not_custom | |
| %option{:value => "1"} | |
| \FASHION & STYLE | |
| %option{:value => "2"} |
| module Quarterly | |
| class CancelationsReport | |
| class CancelationsPresenter < SimpleDelegator | |
| def subscription_totals(start) | |
| subscriptions.active.where("created_at < ?", start).count | |
| end | |
| def new_subscriptions(start, ending) | |
| subscriptions.active.where("created_at between ? and ?", |
| { | |
| "payload": { | |
| "text": "awesomesauce" | |
| } | |
| } |
| require 'stripe' | |
| namespace :quarterly do | |
| desc 'associate json file with existing users' | |
| task json_to_stripe: :environment do | |
| File.open("tmp/q_import.json", "r") do |file| | |
| parsed_data = JSON.parse file.read | |
| parsed_data['ids'].each do |id| | |
| next if good_customer(stripe_account(id.last)) | |
| associate_with_stripe(stripe_account(id.last), spree_user_by_profile(id.first)) | |
| end |
| User.joins('LEFT JOIN spree_credit_cards ON spree_users.payment_source_on_file_id = spree_credit_cards.id').where('spree_credit_cards.gateway_customer_profile_id like ?', "4%") |
| .F.F.F.F.F.F.F | |
| Failures: | |
| 1) Spree::PaidOrderFactory given a valid credit card #create creates a shipment | |
| Failure/Error: Unable to find matching line from backtrace | |
| ActiveRecord::StatementInvalid: | |
| PG::SyntaxError: ERROR: syntax error at or near "-" | |
| LINE 1: SAVEPOINT active_record_-1 | |
| ^ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| fancy-ctrl-z () { | |
| if [[ $#BUFFER -eq 0 ]]; then | |
| fg | |
| zle redisplay | |
| else | |
| zle push-input | |
| zle clear-screen | |
| fi | |
| } | |
| zle -N fancy-ctrl-z |