Skip to content

Instantly share code, notes, and snippets.

@refaelos
refaelos / gist:ca4ede66747cb2c24ad4
Last active January 17, 2016 20:33
stripe charge
var stripe = require("stripe")(
process.env.NODE_ENV==="production" ? "xxx_live" : "xxx_test"
);
stripe.charges.create({
amount : 50,
currency : "usd",
source : token, // obtained with Stripe.js
description: "Charge for user"
}, function (err, charge) {
/**
*
* This node script will rename all keys according to a given pattern.
*
**/
var redisClient = redis.createClient(config.redis.port, config.redis.host),
search = '*something*', // will rename all keys that contains 'something'
postfix = '.postfix', // all keys will get the postfix '.postfix'
prefix = 'prefix.'; // all keys will get the prefix '.prefix'
@refaelos
refaelos / gist:11409118
Created April 29, 2014 19:09
People in meetings per day
var peeps = [
"Jieling",
"Claudio",
"Sofia",
"Georgy",
"Mitch",
"Antón",
"Daniel",
"Morten",
"Anthony",
/**
* Select your in-app billing service.
* The default is Google Play using https://github.com/soomla/android-store-google-play
*/
public static final IIabService InAppBillingService = new GooglePlayIabService();
@refaelos
refaelos / gist:5795413
Created June 17, 2013 08:22
error when 'jitsu deploy'
info: Creating snapshot 0.0.1-4
info Uploading: [=============================] 100%
info: Updating app highway
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: Subdomain chosen belongs to another user
error: at AppController._isFreeRootSubdomain (/root/nodejitsu/lib/nodejitsu/resources/app/controller.js:1096:17)
error: at Resource._request (/root/nodejitsu/node_modules/resourceful/lib/resourceful/resource.js:184:13)
error: at Function.Resource.runAfterHooks (/root/nodejitsu/node_modules/resourceful/lib/resourceful/resource.js:93:12)