Skip to content

Instantly share code, notes, and snippets.

@sfblaauw
sfblaauw / Register.js
Last active Mar 1, 2019
react-stepzilla: How to persist Step State on "Previous/Back" button click
View Register.js
// @flow
import React, { Component } from 'react';
import StepZilla from 'react-stepzilla';
import isEmail from 'validator/lib/isEmail';
import queryString from 'query-string';
type State = {
step1: { email: string },
step2: { firstname: string, lastname: string, password: string },
};
@sfblaauw
sfblaauw / Elasticsearch
Last active Aug 29, 2015
Elasticsearch
View Elasticsearch
curl -XPUT 'localhost:9200/myapp/car/1' -d '{ "name": "Volkswagen Golf GTI 105" }'
curl -XPUT 'localhost:9200/myapp/car/2' -d '{ "name": "Volkswagen Golf TDI 105" }'
curl -XPUT 'localhost:9200/myapp/car/3' -d '{ "name": "Volkswagen Golf GTI 90" }'
curl -XPUT 'localhost:9200/myapp/car/4' -d '{ "name": "Volkswagen Golf TDI 90" }'
curl -XPUT 'localhost:9200/myapp/car/5' -d '{ "name": "Volkswagen Golf GTI" }'
curl -XPUT 'localhost:9200/myapp/car/6' -d '{ "name": "Volkswagen Golf TDI" }'
curl -XPUT 'localhost:9200/myapp/car/7' -d '{ "name": "Golf GTI 105" }'
curl -XPUT 'localhost:9200/myapp/car/8' -d '{ "name": "Golf TDI 105" }'
curl -XPUT 'localhost:9200/myapp/car/9' -d '{ "name": "Golf GTI 90" }'
curl -XPUT 'localhost:9200/myapp/car/10' -d '{ "name": "Golf TDI 90" }'
You can’t perform that action at this time.