Since String.format()
is not in the whitelist, sometimes it's nice to be able
to use string interpretation in scripts. Groovy allows doing this with GString
interpretation.
DELETE /script
{}
~/src/clj/clj-http:pr/235 λ| lein all test :all | |
Performing task 'test' with profile(s): 'dev,1.5' | |
Reflection warning, clj_http/multipart.clj:26:4 - call to org.apache.http.entity.mime.content.FileBody ctor can't be resolved. | |
Reflection warning, clj_http/test/client.clj:35:48 - reference to field getBytes can't be resolved. | |
lein test clj-http.test.client | |
"a=1&b=%7B%3Ac+%222%22%7D" | |
lein test :only clj-http.test.client/roundtrip |
#!/usr/bin/env zsh | |
curl -XDELETE 'localhost:9200/mal' | |
echo | |
curl -XPOST 'localhost:9200/mal' -d'{ | |
"mappings": { | |
"doc": { | |
"properties": { | |
"num": {"type": "integer", "ignore_malformed": true} | |
} |
#!/usr/bin/env zsh | |
for url in `cat config/elasticsearch.yml| fgrep "<http://elasticsearch.org" | cut -d\< -f2 | cut -d\> -f1`; do | |
curl -sL -w "%{http_code} %{url_effective}\\n" "$url" -o /dev/null | |
done |
#!/usr/bin/env zsh | |
curl -XDELETE localhost:9200/ss-test | |
curl -XPOST 'localhost:9200/ss-test' -d' | |
{ | |
"mappings": { | |
"doc": { | |
"_source": { | |
"enabled": true |
#!/usr/bin/env zsh | |
curl -s -XDELETE localhost:9200/missing-test | |
curl -s -XPOST localhost:9200/missing-test -d' | |
{ | |
"mappings": { | |
"doc": { | |
"_source": { | |
"enabled": true | |
}, |
(ns cheshire.experimental | |
(:require [cheshire.core :refer :all] | |
[clojure.java.io :refer :all]) | |
(:import (java.io ByteArrayInputStream FilterInputStream | |
SequenceInputStream))) | |
(defn escaping-input-stream | |
[is] | |
(let [new-is (proxy [FilterInputStream] [is] | |
(read |
#!/usr/bin/env zsh | |
curl -XDELETE localhost:9200/get-test | |
curl -XPOST 'localhost:9200/get-test' -d' | |
{ | |
"mappings": { | |
"doc": { | |
"_source": { | |
"enabled": true |
#!/usr/bin/env zsh | |
curl -XDELETE localhost:9200/get-test | |
curl -XPOST 'localhost:9200/get-test' -d' | |
{ | |
"mappings": { | |
"doc": { | |
"_source": { | |
"enabled": true |
#!/bin/zsh | |
# elasticsearch 0.20.1 vanilla | |
curl -s -XPUT "http://localhost:9200/testidx" -d '{"index":{"number_of_shards":1,"number_of_replicas":0}}' | |
echo | |
curl -s -XPUT "http://localhost:9200/testidx/msg/1?refresh=true" -d '{"id":"1","message":"test"}' | |
echo |