Skip to content

Instantly share code, notes, and snippets.

description "ElasticSearch"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
respawn limit 10 5
#!/bin/bash
echo Deleting index if it exists
curl -s -XDELETE localhost:9200/blue-sky-monster >/dev/null
echo Creating test index
curl -s -XPUT localhost:9200/blue-sky-monster -d '
{
"mappings": {
"user": {
#!/bin/sh
alias c="curl -s"
c -XDELETE localhost:9200/fmarchand >/dev/null
c -XPUT localhost:9200/fmarchand -d '
{
"index": {
"analysis": {
{
"_shards": {
"failed": 0,
"successful": 5,
"total": 5
},
"facets": {
"title": {
"_type": "terms",
"missing": 2,
#!/bin/sh
alias c="curl -s"
c -XDELETE localhost:9200/ove_rebel
echo
c -XPUT localhost:9200/ove_rebel -d '
{
"mappings": {
curl -s localhost:9200/_search -d '
{
"from": 0,
"query": {
"filtered": {
"filter": {
"term": {
"category": "1"
}
},
#!/bin/sh
alias c="curl -s"
c -XDELETE localhost:9200/bhelx >/dev/null
c -XPUT localhost:9200/bhelx/t/1 -d '
{
"tags": [
"foo",
#!/bin/sh
alias c="curl -s"
c -XDELETE localhost:9200/bhelx >/dev/null
c -XPUT localhost:9200/bhelx/t/1 -d '
{
"tags": [
"foo",
2012/12/09 Product Sales
Income:Sales $ -10,743.47
Expenses:Credit Fees $ 429.74
Assets:Undeposited $ 10,313.73
#!/bin/sh
d=`date +%Y%m%d%H%M%S`
nAmE="${1:-vbox-$d}"
iso=/d/iso/ubuntu-mini.iso
size=1000
base=~/vbox
drive="$base/$nAmE/$nAmE.vdi"
echo '* ' create $nAmE