Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.
function foo ({
bar = 'no',
baz = 'works!'
} = {}) {
import React from 'react'; | |
import { shallow } from 'enzyme'; | |
import MyComponent from '../src/my-component'; | |
const wrapper = shallow(<MyComponent/>); | |
describe('(Component) MyComponent', () => { | |
it('renders without exploding', () => { | |
expect(wrapper).to.have.length(1); | |
}); |
git remote prune origin | |
git branch -r --merged master | egrep -iv '(master|develop)' | sed 's/origin\///g' | xargs -n 1 git push --delete origin |
See https://github.com/parente/nbestimate for on-going updates to the data and notebook.
#!/bin/bash | |
# Check out the blog post at: | |
# | |
# http://www.philipotoole.com/influxdb-and-grafana-howto | |
# | |
# for full details on how to use this script. | |
AWS_EC2_HOSTNAME_URL=http://169.254.169.254/latest/meta-data/public-hostname | |
INFLUXDB_DATABASE=test1 |
/** @scratch /configuration/config.js/1 | |
* == Configuration | |
* config.js is where you will find the core Grafana configuration. This file contains parameter that | |
* must be set before Grafana is run for the first time. | |
*/ | |
define(['settings'], | |
function (Settings) { | |
"use strict"; | |
return new Settings({ |