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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
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 |
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
" Set font according to system | |
if has("mac") | |
set gfn=Inconsolata-dz:h12 | |
set shell=/bin/bash | |
elseif has("win32") | |
set gfn=Bitstream\ Vera\ Sans\ Mono:h13 | |
elseif has("unix") | |
set gfn=Ubuntu\ Mono\ 12 | |
endif |
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 [ "$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 |
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
-- 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) |
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
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 |
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
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 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# 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} |
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
============================= 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 |
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
============================= 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 |
OlderNewer