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
Revenue Recognition Event | |
Spending transaction - A customer has used coins to purchase cards. | |
Purchasing transaction - A customer has purchased coins for money. | |
Bucket - Coins yet to be recognized from a purchasing transaction. | |
Revenue Recognition Event - records the steps taken in the revenue recognition process. This objects records the coins used, the purchasing transaction, the spending transaction, number of coins used during the recognition, and the cost of the coins recognized during the recognition process |
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 "when handling results" do | |
before(:each) do | |
AMQP.stub!(:connect) | |
MQ.stub!(:new) | |
Nanite::MapperProxy.new('mapperproxy', {}) | |
@instance = Nanite::MapperProxy.instance | |
@fanout = stub(:fanout, :publish => true) | |
@instance.amqp.stub!(:fanout).and_return(@fanout) | |
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
#$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__)) | |
require 'mongo_mapper' | |
require 'pp' | |
class NedFlanders | |
def initialize | |
MongoMapper.database = 'testing' | |
end | |
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
#hopefully this will help anyone else that ends up looking for this. I ended up looking this up a couple of times and figured it was worth writing down. | |
xml_document = Nokogiri::XML(File.read(File.join(File.dirname(__FILE__),'somexmlfile.xml'))) | |
xml_document.internal_subset.system_id | |
xml_document.internal_subset.external_id |
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 'rubygems' | |
require 'httparty' | |
require 'set' | |
class FBProblem | |
include HTTParty | |
format :json | |
base_uri "https://graph.facebook.com" | |
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
rabbitmqctl -n rabbit@localhost list_queues -p /nanite name durable auto_delete arguments pid owner_pid exclusive_consumer_pid exclusive_consumer_tag messages_ready messages_unacknowledged messages consumers memory |
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
#assumption that all Hashes have the de-dupe key, and the de-dupe key represents a unique | |
#identifier | |
def dedupe_by_key array,key | |
collector = {} | |
array.each{|element| | |
collector[element[key]] = element | |
} |
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
1. Homebrew was previously installed, but I encountered an issue when attempting to upgrade/install because I was not the owner of /usr/local |
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
Thoughts on being an api provider | |
1. Its a contract, be sure to have a clear idea on how you intend to version your api. Header fields set, special pathing, choose your poison but for the sake of your users prepare to stick to it. Choosing this early will allow you a good amount of wiggle room without pulling the rug from under your users. | |
2. Know your consumers, is this an internal only api. Do you need to restrict data from certain user? Is this public or will it be in the future. | |
Are you acting on a user's behalf or just providing data to everyone |
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
{ name: "Tattoo Artist I Follow" | |
[{username: "2spirit_tattoo"}, | |
{username: "allyriley"}, | |
{username: "alvaroflorestattooer"}, | |
{username: "babakhintatau"}, | |
{username: "trocchio"}, | |
{username: "davetattoos"}, | |
{username: "gerhardwiesbeck"}, | |
{username: "jondix"}, | |
{username: "black_ink_power"}, |
OlderNewer