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
(function(w) { | |
if (w.chrome && w.console) { | |
// Console Easter Egg. | |
// TODO: Abstract this into a separate library. | |
var logoStyle = [ | |
'margin: 10px 0', | |
'padding: 2px 3px 3px', | |
'color: transparent', | |
'background-image: url("http://appcues.com/images/logos/mark-angle.png")', | |
'background-repeat: no-repeat', |
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
// My Solution | |
function decrypt(h) { | |
var s = '', | |
letters = 'acdegilmnoprstuw'; | |
for(i = 7; i > 0; i--) { | |
var p = h % 37, | |
l = letters.charAt(p), | |
s = l + s, | |
h = (h - p)/37; |
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
Keen.onChartsReady(function() { | |
// Create a Series containing our total $ amount in Keen IO credit card transactions (to and from) | |
// Excludes: refund transactions from Stripe to card and declined cards | |
var myMetric = new Keen.Series("Stripe_Event", { | |
analysisType: "sum", | |
timeframe:"this_month", | |
interval:"daily", | |
targetProperty: "data.object.amount", | |
filters: [ |
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
Keen.onChartsReady(function(){ | |
// Create a Metric containing our total $ amount in Keen IO credit card transactions (to and from) | |
// Excludes: refund transactions from Stripe to card and declined cards | |
var myMetric = new Keen.Metric("Stripe_Event", { | |
analysisType: "sum", | |
targetProperty: "data.object.amount", | |
filters: [ | |
{"property_name":"data.object.captured","operator":"eq","property_value":true}, | |
{"property_name":"data.object.amount_refunded","operator":"eq","property_value":0}] | |
}); |