Skip to content

Instantly share code, notes, and snippets.

View eduresende's full-sized avatar

Eduardo Resende eduresende

View GitHub Profile
============================= unit #<Unit id: 2, uuid: "10-b93c86b1-7572-4e7e-9e91-cf1bb9c1c82a", seller_id: 2, buyer_id: 4, product_id: 1, email: "steve4@example.com", name: "Steve Jobs", birthdate: "1996-06-16", phone: "1234567890", installments: 1, state: "authorized", token: "token1", moip_code: "code1", credit_card_flag: nil, lock_version: 0, created_at: "2016-06-16 12:09:21", updated_at: "2016-06-16 12:09:21", street: "Barros Travessa", number: "4", complement: nil, province: "SP", city: "Velha Cecília", zipcode: "04102000", neighborhood: "Anywhere", sold_at: "2016-06-16 12:09:21", postoffice_code: nil, shipped_at: nil, received_at: nil, seller_received: false, release_to_buy_at: "2016-06-16 12:19:21", deleted_at: nil, reserved_by_id: 3, payment_method: "BS", pay_seller_on: nil, blocked: false, bank: nil, price_cents: 3564, commission_cents: 928, profit_cents: 810, outpost_commission_cents: 1069, seller_received_confirmed_at: nil, seller_received_moip_code: nil, shipping_price_cents: 356, shipping_price
============================= unit #<Unit id: 2, uuid: "10-b93c86b1-7572-4e7e-9e91-cf1bb9c1c82a", seller_id: 2, buyer_id: 4, product_id: 1, email: "steve4@example.com", name: "Steve Jobs", birthdate: "1996-06-16", phone: "1234567890", installments: 1, state: "authorized", token: "token1", moip_code: "code1", credit_card_flag: nil, lock_version: 0, created_at: "2016-06-16 12:09:21", updated_at: "2016-06-16 12:09:21", street: "Barros Travessa", number: "4", complement: nil, province: "SP", city: "Velha Cecília", zipcode: "04102000", neighborhood: "Anywhere", sold_at: "2016-06-16 12:09:21", postoffice_code: nil, shipped_at: nil, received_at: nil, seller_received: false, release_to_buy_at: "2016-06-16 12:19:21", deleted_at: nil, reserved_by_id: 3, payment_method: "BS", pay_seller_on: nil, blocked: false, bank: nil, price_cents: 3564, commission_cents: 928, profit_cents: 810, outpost_commission_cents: 1069, seller_received_confirmed_at: nil, seller_received_moip_code: nil, shipping_price_cents: 356, shipping_price
============================= unit #<Unit id: 2, uuid: "10-b93c86b1-7572-4e7e-9e91-cf1bb9c1c82a", seller_id: 2, buyer_id: 4, product_id: 1, email: "steve4@example.com", name: "Steve Jobs", birthdate: "1996-06-16", phone: "1234567890", installments: 1, state: "authorized", token: "token1", moip_code: "code1", credit_card_flag: nil, lock_version: 0, created_at: "2016-06-16 12:09:21", updated_at: "2016-06-16 12:09:21", street: "Barros Travessa", number: "4", complement: nil, province: "SP", city: "Velha Cecília", zipcode: "04102000", neighborhood: "Anywhere", sold_at: "2016-06-16 12:09:21", postoffice_code: nil, shipped_at: nil, received_at: nil, seller_received: false, release_to_buy_at: "2016-06-16 12:19:21", deleted_at: nil, reserved_by_id: 3, payment_method: "BS", pay_seller_on: nil, blocked: false, bank: nil, price_cents: 3564, commission_cents: 928, profit_cents: 810, outpost_commission_cents: 1069, seller_received_confirmed_at: nil, seller_received_moip_code: nil, shipping_price_cents: 356, shipping_price
============================= unit #<Unit id: 2, uuid: "10-b93c86b1-7572-4e7e-9e91-cf1bb9c1c82a", seller_id: 2, buyer_id: 4, product_id: 1, email: "steve4@example.com", name: "Steve Jobs", birthdate: "1996-06-16", phone: "1234567890", installments: 1, state: "authorized", token: "token1", moip_code: "code1", credit_card_flag: nil, lock_version: 0, created_at: "2016-06-16 12:09:21", updated_at: "2016-06-16 12:09:21", street: "Barros Travessa", number: "4", complement: nil, province: "SP", city: "Velha Cecília", zipcode: "04102000", neighborhood: "Anywhere", sold_at: "2016-06-16 12:09:21", postoffice_code: nil, shipped_at: nil, received_at: nil, seller_received: false, release_to_buy_at: "2016-06-16 12:19:21", deleted_at: nil, reserved_by_id: 3, payment_method: "BS", pay_seller_on: nil, blocked: false, bank: nil, price_cents: 3564, commission_cents: 928, profit_cents: 810, outpost_commission_cents: 1069, seller_received_confirmed_at: nil, seller_received_moip_code: nil, shipping_price_cents: 356, shipping_price
# com um cartão de crédito válido
{"bundle"=>{"id"=>1, "seller"=>{"id"=>1, "nickname"=>"steve-293e34", "name"=>"Steve Jobs", "avatar"=>{"id"=>1, "filename"=>nil, "cloudinary_public_id"=>"6046930ce1d0151bf68d62a8a500fc72", "crop"=>{"x"=>nil, "y"=>nil, "width"=>nil, "height"=>nil}}, "email"=>"steve1@example.com", "gender"=>"M", "href"=>"/steve-293e34", "city"=>"Município de Margaridado Descoberto - SP", "follow_user"=>false, "created_at"=>"2016-03-01T11:14:18.263-03:00", "header"=>{"id"=>1, "filename"=>nil, "cloudinary_public_id"=>"d94c059ed2a167891955fe916f48801d", "crop"=>{"x"=>nil, "y"=>nil, "width"=>nil, "height"=>nil}}, "counters"=>{"following_count"=>0, "followers_count"=>0, "likes_count"=>0, "badges_count"=>0, "available_products_count"=>0, "sold_products_count"=>0, "purchases_count"=>0, "sales_count"=>0}, "title"=>nil, "description"=>nil, "average_delivery_days"=>nil, "formatted_phone_number"=>"(12) 3456-7890", "phone_number"=>"1234567890", "can_sell_with_bundle"=>false, "can_buy_with_bundle"=>false}
@eduresende
eduresende / 0_reuse_code.js
Created February 10, 2016 16:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
parse_git_branch ()
{
local GITDIR=`git rev-parse --show-toplevel 2>&1` # Get root directory of git repo
if [[ "$GITDIR" != '/Users/eduardo' ]] # Don't show status of home directory repo
then
# Figure out the current branch, wrap in brackets and return it
local BRANCH=`git branch 2>/dev/null | sed -n '/^\*/s/^\* //p'`
if [ -n "$BRANCH" ]; then
echo -e "[$BRANCH]"
fi
class Board
def initialize(n)
@n = n
@board = []
(0...@n).each { |i| @board << Array.new(@n, 'x') }
@x = 0
@y = 0
@color = "R"
@direction = :right
@colored_positions = 0
-- Project: Attack of the Cuteness Game
-- http://MasteringCoronaSDK.com
-- Version: 1.0
-- Copyright 2013 J. A. Whye. All Rights Reserved.
-- "Space Cute" art by Daniel Cook (Lostgarden.com)
-- housekeeping stuff
display.setStatusBar(display.HiddenStatusBar)
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\] $(parse_git_branch) \n'
else
PS1="\n\n\n\n\[\033[32m\]\u \[\033[01;34m\][\w]\[\033[31m\] \$(parse_git_branch)\[\033[m\]\n$ "
fi