Skip to content

Instantly share code, notes, and snippets.

View antoniosilveira's full-sized avatar

Antonio Silveira antoniosilveira

View GitHub Profile
@antoniosilveira
antoniosilveira / gist:3521677
Created August 30, 2012 02:07
Credit Card Payment example with Stride
>>> import stripe
stripe.api_key = "vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE"
stripe.Charge.create(
amount=400,
currency="usd",
card={
"number": '4242424242424242',
"exp_month": '12',
"exp_year": '2012',
"cvc": '123'
@antoniosilveira
antoniosilveira / virtual-env-nodejs
Created October 16, 2013 06:45
NodeJS Virtual Environment Code (.profile)
# Checks that the child directory is a subdirectory of the parent
is_subdirectory() {
local child="$1"
local parent="$2"
if [[ "${child##${parent}}" != "$child" ]]; then
return 0
else
return 1
fi
}