This file contains hidden or 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
Vagrant.require_version ">= 1.8.0" | |
$elasticVersion = "5.3.1" | |
# download the jdk from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | |
$jdkVersion = "8u131" | |
$downloads = "https://artifacts.elastic.co/downloads" | |
$esConfig = <<SCRIPT | |
# dumb check to see if this already ran | |
if [ ! -d /usr/java ]; then |
This file contains hidden or 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 rison = require('rison-node'); | |
var appState = { | |
filters: {}, | |
query: { | |
querystring: { | |
analyze_wildcard: true, | |
query: "my query here", | |
} | |
} |
This file contains hidden or 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
export function latestChange(...firstArgs) { | |
let oldState = firstArgs; | |
let prevValue = null; | |
return (...args) => { | |
let found = false; | |
const newState = oldState.map((oldVal, i) => { | |
const val = args[i]; | |
if (!found && oldVal !== val) { |
This file contains hidden or 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
import React from 'react'; | |
// input MyInputComponent/index.js by convention, which is the wrapped version of the component | |
import { MyInputComponent } from './MyInputComponent'; | |
export function App() { | |
return ( | |
<div> | |
<h1>App!</h1> | |
<MyInputComponent expression="initial value" /> | |
</div> |
This file contains hidden or 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
# A watch with only a trigger. As this watch | |
# has no actions there is no question of them | |
# ever executing. | |
DELETE _xpack/watcher/watch/only-trigger | |
PUT _xpack/watcher/watch/only-trigger | |
{ | |
"trigger": { | |
"schedule": { | |
"interval": "5m" | |
} |
This file contains hidden or 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
# Generated by iptables-save v1.6.0 on Fri Mar 31 20:28:53 2017 | |
*security | |
:INPUT ACCEPT [18529451:10839683327] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [18575080:10168614356] | |
COMMIT | |
# Completed on Fri Mar 31 20:28:53 2017 | |
# Generated by iptables-save v1.6.0 on Fri Mar 31 20:28:53 2017 | |
*raw | |
:PREROUTING ACCEPT [18547623:10841082102] |
This file contains hidden or 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
import { findIndex } from 'lodash'; | |
export const initialState = { | |
users: [{ | |
id: 'cpo5ienzpf', | |
name: 'joe', | |
active: true, | |
}], | |
lists: [{ | |
id: '9fve86satx', |
This file contains hidden or 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
import React from 'react'; | |
import { TodoListItem } from './TodoListItem'; | |
export function TodoList(props) { | |
if (props.todos.length === 0) return null; | |
const handleOnToggle = (todo) => () => props.onToggle(todo); | |
const handleOnSave = (todo) => (value) => props.onSave(todo, value); | |
const handleOnDestroy = (todo) => () => props.onDestroy(todo); |
This file contains hidden or 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
const docTypes = _.groupBy(docs, doc => { | |
switch (doc._type) { | |
case 'search': | |
return 'searches' | |
default: | |
return 'other' | |
} | |
}); |
This file contains hidden or 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
import _ from 'lodash'; | |
const MIN_CONTEXT_SIZE = 0; | |
const QUERY_PARAMETER_KEYS = Object.keys(createInitialQueryParametersState()); | |
function QueryParameterActionsProvider(config) { | |
const defaultSizeStep = parseInt(config.get('context:step'), 10); | |
const setPredecessorCount = (state) => (predecessorCount) => ( |