Skip to content

Instantly share code, notes, and snippets.

@tylerfontaine
tylerfontaine / site.pp
Last active February 14, 2018 21:17
Sample Puppet site.pp file for privisioning ES for master, data, and client nodes based on hostname
# Simple Puppet site.pp Example. This sets up regex node definitions so you can automate the setup of master, data, and client nodes with puppet.
# note that because this installs java, it requires the puppetlabs/java module as well
# This is based on the elasticsearch puppet module available here: https://forge.puppetlabs.com/elasticsearch/elasticsearch
# The general idea here is that there's a puppetmaster server setup, with this file sitting in its production environment space.
# To add a node, set its hostname to match for master, data, or client, e.g.: esdata03.eslocal.net in this case.
# Your hostnames will differ, so you will need to adjust the regex to match your particular case.
# This also installs the license and marvel-agent plugins, to serve as an example for installing plugins of any type.
#first the master nodes
node /^esmaster.*\.eslocal\.net/ {
@tylerfontaine
tylerfontaine / repro.md
Last active November 16, 2016 22:03
multi-field boosting bug Repro

Step 1 - create the mapping

PUT subfield-repro
{
   "settings": {
      "analysis": {
         "analyzer": {
            "reverser": {
               "type": "custom",

Keybase proof

I hereby claim:

  • I am tylerfontaine on github.
  • I am thursdayschild (https://keybase.io/thursdayschild) on keybase.
  • I have a public key ASCtWQOQgX-bIBfe2vSTSoK5GNF3h7VZnEcuZ8YHjd5xCwo

To claim this, I am signing this object:

@tylerfontaine
tylerfontaine / step1.load
Created August 19, 2020 18:16
Copy Table(s) from one database to another
LOAD DATABASE
FROM postgresql://postgres:password@localhost/postgres
INTO postgresql://postgres:password@localhost/testdb-copy
WITH include drop, create tables, schema only
including only table names matching 'test' in schema 'public'
AFTER LOAD DO
$$ SELECT create_hypertable('test', 'time') $$ ;
Broccoli Rice Casserole
3 cups uncooked jasmine or basmati rice
Heavy Cream
Milk
1 large onion
3 heads broccoli with stems
Yellow cheddar (#2)
Extra Sharp white cheddar (#1)
Gruyere (#3)