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
ParentCollection = require('collections/common/parent_collection') | |
Channel = require('models/channel') | |
module.exports = class Channels extends ParentCollection | |
model: Channel | |
modelSingular: 'channel' | |
driverLabel: 'Cost driver' | |
driverList: | |
exclude: 'Exclude this channel from the plan' | |
manual: 'Forecast this channel manually' |
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
NestedParentView = require('views/analysis/common/nested_parent_view') | |
module.exports = class ChannelsIndexListView extends NestedParentView | |
pageGuideContext: | |
title: 'Channel list' | |
items: [ | |
target: '.breadcrumbs .last' | |
direction: 'right' | |
description: 'Channels are simply sources of new customers. By building | |
customer acqusition strategy around a portfolio of channels, it much |
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
module.exports = class BaseChartView extends View | |
className: 'chart-container' | |
initialize: (@options) -> | |
# ... | |
@chart = new Tactile.Chart @options | |
@chart.addSeries(series) if series | |
@chart.element(@el) |
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
module.exports = class ChartUpperView extends BaseChartView | |
initialize: (options) -> | |
super(options) | |
@chart.height(400) |
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
# Base class for all views which display dynamically | |
# | |
# Backbone.js still does not have convenient way for avoiding memory leaks | |
# This class added this functionality. Most of the code inspired by backbone.marionette | |
# | |
# Examples: | |
# | |
# # Way to add subview in current view | |
# # When router will remove this view all nested/sub view will be remove automatically | |
# @createView SubView, collection: @something |
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
calculate: (periodId) => | |
r = | |
periodUnix: app.periods.idToUnix(periodId) | |
beginningCash: @get(app.periods.prevId(periodId))?.endingCash | |
if app.periods.notPast(periodId) | |
s = app.scenario.toJSON() | |
keys = ['revenue', 'cogs', 'custAcq', 'team', 'vendor'] | |
_.each keys, (key) => | |
days = if key is 'custAcq' then s.cust_acq_days else s["#{key}_days"] |
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
calculate: (periodId) => | |
# we use a 1 character variable for the return value since calculations are | |
# reused so many times for other calculations | |
r = | |
periodUnix: app.periods.idToUnix(periodId) | |
# regardless of plan/actual, beginning cash is last month's ending cash | |
beginningCash: @get(app.periods.prevId(periodId))?.endingCash |
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 TimeSlider = require('react-time-slider'); | |
var Example = React.createClass({ | |
render: function() { | |
var timeSlider = TimeSlider({ | |
minFrom: 201402, | |
maxTo: 201411, | |
initialFrom: 201404, | |
initialTo: 201408, | |
onChange: function(values) { |
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 ( youHaveEnoughTimeToFuckingNailDevOps ) { | |
beSureToCaptureEverythingViaDevOpsToolsLikeAnAdult(); | |
} else { | |
useSomethingLikeHerokuWhereAllConfigMustExpicitlyBeDeclared(); | |
} | |
function beSureToCaptureEverythingViaDevOpsToolsLikeAnAdult () { | |
useVagrantAndOrDockerToCreateEnvironmentsYouCanSpinUpLocallyWithOneCommand(); | |
useSomethingLikeConsulToCaptureAllGoofyConfigSoThatYouCanSpinUpProductionEnvsWithOneClick(); | |
} |
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
diff --git a/application.py b/application.py | |
index 15cb3eb..a37a14f 100644 | |
--- a/application.py | |
+++ b/application.py | |
@@ -11,6 +11,7 @@ from util import ThrottleQueue | |
from boto.dynamodb.table import Table | |
from boto.dynamodb.item import Item | |
from boto import connect_dynamodb | |
+from boto import connect_kinesis | |