On a company's balance sheet, accounts receivable are the money owed to that company by entities outside of the company. Account receivables are classified as current assets assuming that they are due within one calendar year or fiscal year. To record a journal entry for a sale on account, one must debit a receivable and credit a revenue account. When the customer pays off their accounts, one debits cash and credits the receivable in the journal entry. The ending balance on the trial balance sheet for accounts receivable is usually a debit.
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 message doesn't contain max retry info then | |
# publish to delay (dead-letter) queue with first step | |
# elsif message contains retry info that's not max then | |
# update retry step and publish to delay dead-letter queue | |
# else | |
# send to error (dead-letter) queue |
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
describe Book do | |
it "glorifies published at" do | |
book = Book.new | |
def book.published_at | |
Time.new(2012, 1, 2) | |
end | |
book.glorified_published_at.must_equal "The most awesome and first Monday of the glorious year of 2012" | |
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 ActsAsOwned | |
def acts_as_owned(options = {}) | |
raise 'Must define owner lambda' unless options[:owner] && options[:owner].class == Proc | |
define_method(:owner, &options[:owner]) | |
end | |
end | |
ActiveRecord::Base.send :extend, ActsAsOwned |
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
export PATH=/usr/local/bin:$PATH | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
export PATH="$HOME/bin:$PATH" | |
export PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin:$PATH" | |
source ~/.git-prompt.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
module Ruby2Prepend | |
module GetExtensions | |
module ClassMethods | |
def get | |
super + 1 | |
end | |
end | |
def self.prepended(base) | |
class << base |
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
queue = Sidekiq::Queue.new("deferred") | |
csv CSV.new | |
queue.each do |job| | |
job.klass # => 'DeferredReady' | |
job.args # => [1] | |
csv << "#{job.id}#{job.klass},#{job.args}" | |
end | |
queue.clear |
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
### Keybase proof | |
I hereby claim: | |
* I am gabrieljoelc on github. | |
* I am gabrieljoelc (https://keybase.io/gabrieljoelc) on keybase. | |
* I have a public key whose fingerprint is 1DC6 3C05 B86E 1AF7 7987 DA18 C44E FDC4 9C79 5BF9 | |
To claim this, I am signing this object: |
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
ENV['RAILS_ENV'] = 'test' | |
require './config/environment' | |
require 'minitest/spec' | |
require 'spinach/capybara' | |
require_relative 'spinach_helper' | |
require_relative 'sauce' | |
Spinach::Scenario.send(:prepend, SpinachHelper::Scenario) | |
begin |
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 Dollarable | |
def acts_as_dollarable | |
attribute_names.select { |m| m.ends_with?('_cents') }.each do |m| | |
define_method m.gsub(/_cents/, '') do | |
value = send(m) | |
return BigDecimal(0) if value.blank? || value.zero? | |
BigDecimal(value) / 100 | |
end | |
end | |
end |
OlderNewer