Provides a visualization similar to google analytics shopper behavior analytics.
- d3js
- underscorejs
| import { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js'; | |
| const wrapper = mountWithIntl( | |
| <CustomComponent /> | |
| ); | |
| expect(wrapper.state('foo')).to.equal('bar'); // OK | |
| expect(wrapper.text()).to.equal('Hello World!'); // OK |
| import Relay from 'real-react-relay'; | |
| export class Mutation extends Relay.Mutation { | |
| _resolveProps(props) { | |
| this.props = props; | |
| } | |
| } | |
| export class MockStore { | |
| reset() { |
| license: gpl-3.0 |
| var width = 500, | |
| height = 500, | |
| r = 450 | |
| var svg = d3.select('html') | |
| .append('svg') | |
| .attr({width: width, height: height}) | |
| .append('g') | |
| .translate([10, height - 10]) |
| let Rx = require(`rx`) | |
| function makeRequestProxies(drivers) { | |
| let requestProxies = {} | |
| for (let name in drivers) { | |
| if (drivers.hasOwnProperty(name)) { | |
| requestProxies[name] = new Rx.ReplaySubject(1) | |
| } | |
| } | |
| return requestProxies |
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
| import React, { Component } from 'react'; | |
| import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux'; | |
| import { provide, connect } from 'react-redux'; | |
| import thunk from 'redux-thunk'; | |
| const AVAILABLE_SUBREDDITS = ['apple', 'pics']; | |
| // ------------ | |
| // reducers | |
| // ------------ |
| #!/bin/bash | |
| # modify the following to suit your environment | |
| export DIR_EXPORT="__USER__@__HOSTNAME_EXPORT__:" | |
| export DIR_BACKUP="/srv/backup/mysql" | |
| export DB_USER="__USER__" | |
| export DB_PASSWORD="__PASSWORD__" | |
| export DB_DATE=$(date +%d-%m-%Y) | |
| # Title and version |
| #!/bin/sh | |
| # List of databases to be backed up separated by space | |
| dblist="database1 database2 database3" | |
| # Directory for backups | |
| backupdir=/DIR/mysql_dumps | |
| # Number of versions to keep | |
| numversions=4 |