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
//private methods | |
function debug(msg,info){ | |
if(debugMode && window.console && window.console.log){ | |
if (info){ | |
window.console.log(info+': ',msg); | |
} | |
else{ | |
window.console.log(msg); | |
} | |
} |
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
app.post('/stripeGotoStep02', function (req, res) { | |
var transaction = req.body; | |
var newCustomer = { | |
email: transaction.stripeCustomer.email, | |
plan: transaction.selectedStripePlan.id, | |
card: transaction.stripeToken, | |
description: transaction.stripeCustomer.email, |
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
var url = require('url'); | |
var nodedump = require('nodedump').init({ expand: true }).dump; | |
var stripeKPIs = require('../lib/stripeKPIs.js'); | |
var async = require('async'); | |
module.exports = function (app) { | |
app.get('/stripe/dashboard', function (req, res) { | |
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
Verifying that +abdelkrim is my Bitcoin username. You can send me #bitcoin here: https://onename.io/abdelkrim |
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
{ | |
"tags": [{ | |
"name": "LATITUDE_deg", | |
"results": [{ | |
"groups": [{ | |
"name": "type", | |
"type": "number" | |
}], | |
"values": [ | |
[1123306773000, 46.9976859318, 3], |
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
firstLine=`head -2 $1 | tail -1` | |
if [[ $firstLine == \#* ]]; then # Testing that the file starts with a comment, not yet a real commit ;) | |
echo '<type>(<component>): <subject>' > .prepare-commit-msg-temp | |
echo '' >> .prepare-commit-msg-temp | |
echo '<body>' >> .prepare-commit-msg-temp | |
echo '' >> .prepare-commit-msg-temp | |
echo '# types: feat, fix, docs, style, refactor, test, chore(maintain)' >> .prepare-commit-msg-temp | |
{ cat .prepare-commit-msg-temp; cat $1; } > .prepare-commit-msg-temp2 | |
cat .prepare-commit-msg-temp2 > $1 |
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
build | |
chore (maintain i.e. updating grunt tasks etc; no production code change) | |
ci (continuous integration) | |
docs: add Blaze to list of projects | |
feat: Adding French translation | |
fix (bug fix) | |
perf (performance improvements) | |
refactor | |
revert | |
style: Welcome page tweaks for long texts. Removing ettier unnecessary changes |
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
def sizeof_number(number, currency=None): | |
""" | |
format values per thousands : K-thousands, M-millions, B-billions. | |
parameters: | |
----------- | |
number is the number you want to format | |
currency is the prefix that is displayed if provided (€, $, £...) | |
""" |
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
# Swap values between two variables | |
a = 5 | |
b = 10 | |
a, b = b, a | |
print(a) # 10 | |
print(b) # 5 |
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
def is_even(num): | |
return num % 2 == 0 | |
is_even(10) # True |
OlderNewer