This file contains 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
// Elastic's APM enabled web service sample code | |
var apm = require('elastic-apm-node').start({ | |
serviceName: 'Sample web service', | |
secretToken: '', | |
serverUrl: '' | |
}) | |
var http = require('http'); | |
var server = http.createServer(); |
This file contains 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
################################################## | |
# Kuromoji/ICU Tokenizer comparison Test | |
################################################## | |
# config/userdict_ja.txt | |
# ルークスカイウォーカー,ルーク スカイウォーカー,ルーク スカイウォーカー,カスタム名詞 | |
DELETE app-search-test | |
PUT app-search-test |
This file contains 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
################################################## | |
# Cross Cluster Replication Example | |
################################################## | |
# On follower (remote), register "leader" (origin) cluster | |
PUT /_cluster/settings | |
{ | |
"persistent" : { | |
"cluster" : { |
This file contains 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
################################################## | |
# Function Score Query Example | |
################################################## | |
# Note: `now` should be replaced by `2018-12-06` for expected results | |
# Prepare for items index | |
DELETE items | |
PUT items |
This file contains 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
################################################## | |
# Elasticsearch SQL Example with Apache Log | |
################################################## | |
# | |
# Operations | |
# | |
POST _xpack/sql | |
{ |
This file contains 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
input { | |
elasticsearch { | |
hosts => ["localhost:9200"] | |
index => "" | |
# user => "elastic" | |
# password => "changeme" | |
query => '{"query": {"match_all": {}}}' | |
} | |
} | |
filter {} |
This file contains 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
# via http://apple.stackexchange.com/questions/39430/automatically-scan-cycle-through-safari-tabs | |
tell application "Safari" | |
repeat | |
repeat with i from (count of tabs of window 1) to 1 by -1 | |
set current tab of window 1 to tab i of window 1 | |
delay 10 | |
end repeat | |
end repeat | |
end tell |
This file contains 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
# Japan Population 2017 | |
DELETE japan-population-2017 | |
PUT japan-population-2017 | |
{ | |
"settings": { | |
"number_of_replicas": 0 | |
, "number_of_shards": 1 | |
}, |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<style> | |
span.st-snippet em { | |
font-style: normal; | |
font-weight: bold; | |
background: yellow; | |
} | |
</style> | |
<head> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<form> | |
<input type="text" class="st-default-search-input" /> | |
</form> | |
<script type="text/javascript"> | |
(function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){ | |
(w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t); |
NewerOlder