Skip to content

Instantly share code, notes, and snippets.

@tstibbs
tstibbs / Hello.js
Last active Sep 27, 2016
react-skylight#13
View Hello.js
import React, { Component } from 'react';
import SkyLight from 'react-skylight';
class Hello extends Component {
constructor(props) {
super(props)
}
render() {
return (
@tstibbs
tstibbs / leaflet.html
Created Jun 14, 2016
leaflet control overlay
View leaflet.html
<!DOCTYPE html>
<html>
<!-- fork of http://leafletjs.com/examples/quick-start-example.html -->
<head>
<title>Leaflet Quick Start Guide Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
View leafletscreenposition.html
<!DOCTYPE html>
<!-- Based off https://github.com/xguaita/Leaflet.MapCenterCoord/blob/1211f46947c0f375a717561b9230c8303a178062/examples/simple.html -->
<html>
<head>
<title>Center Position Control - Simple</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" />
View TestFilter.java
package com.example;
import java.net.URL;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
public class TestFilter implements ServletContextListener
{
public void contextInitialized(ServletContextEvent sce)
@tstibbs
tstibbs / bug.sh
Created Jan 13, 2016
Named query causes null pointer
View bug.sh
#!/bin/bash
curl -XPUT 'http://localhost:9200/myindex/' -d '
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 0
}
},
@tstibbs
tstibbs / gist:645e01c5dcdfa9d2a193
Created Jul 15, 2014
"matched_queries" does not include queries within a wrapper query
View gist:645e01c5dcdfa9d2a193
curl -XPUT 'http://localhost:9200/index'
curl -XPUT 'http://localhost:9200/index/thing/1' –d '
{
"stuff": "blah"
}
'
# works
curl -XPOST 'http://localhost:9200/index/_search' –d '
@tstibbs
tstibbs / gist:dc36483f96f8d1471385
Last active Aug 29, 2015
Elasticsearch field 'copy_to' disagrees with itself
View gist:dc36483f96f8d1471385
curl -XPUT 'http://localhost:9200/index1' -d '
{
"mappings": {
"parent": {
"properties": {
"children": {
"type": "nested",
"properties": {
"colour": {
"type": "string"
@tstibbs
tstibbs / gist:1c337313115de57a7229
Created May 13, 2014
Geo and Date fields return different values if fetched from stored value or _source
View gist:1c337313115de57a7229
curl -XPUT "http://localhost:9200/test" -d '
{
"mappings": {
"document": {
"properties": {
"date": {
"type": "date",
"store": "true"
},
"date2": {
@tstibbs
tstibbs / gist:9762265
Created Mar 25, 2014
Elasticsearch geo field causing query parser failure for index which doesn't have that field
View gist:9762265
curl -XPUT localhost:9200/test1 -d '{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"type1": {
"properties": {
"geofield": {
"type": "geo_point"