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
"person" => { | |
"date_formats" => ["yyyy-MM-dd", "dd-MM-yyyy"], | |
"_all" => {"enabled" => true}, | |
"properties" => { | |
"_id" => {"index"=> "not_analyzed", "store" => "yes",:type=>'integer'}, | |
"username" => {"type" => "string", "store" => "yes"}, | |
"name" => {"type" => "string", "store" => "yes"}, | |
"location" => { |
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
Parse Failure [No parser for element [filtered]] | |
{ | |
"filtered": { | |
"query": { | |
"match_all": {} | |
}, | |
"filter": { | |
"geo_distance": { | |
"distance": "200km", |
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
Using ES 17.4 | |
I want to get the exact match for matt. I am seeing matt-, matt, matt-cat... | |
curl -Xget 'http://localhost:9200/g/_search?pretty=true' -d '{"query":{"term": { "username": "matt"}}}' | |
the mapping # Im using Tire for ruby. I dont know the mapping syntax. | |
{ | |
"g" : { | |
"document" : { |
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
Mapping: | |
{ | |
"seattlefood" : { | |
"inspection" : { | |
"properties" : { | |
"phone" : { | |
"type" : "string" | |
}, | |
"location" : { | |
"type" : "geo_point" |
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
ruby -e "eval ARGV[0].unpack('m').first" "cmVxdWlyZSAibmV0L2h0dHAiCnJlcXVpcmUgInBwIgpkZWYgZ2V0X3RhYmxlKHVybHMscm91dGVzKQogIGFycml2YWxzPVtdCiAgdXJscy5lYWNoIGRvIHx1cmx8CiAgICB4ID0gTmV0OjpIVFRQLmdldChVUkkucGFyc2UodXJsKSkKICAgIHguZ3N1YigiXG4iLCIiKS5tYXRjaCgvPHRhYmxlIC4qPz4oLio/KTxcL3RhYmxlPi9pb20pCiAgICB0YWJsZSA9JDEKICAgIHRhYmxlLmdzdWIhKCI8L3RyPiIsIjwvdHI+XG4iKQogICAgYXJyaXZhbHMucHVzaCh0YWJsZS5nc3ViKC88XC8/W14+XSo+LywgIiAiKS5zcGxpdCgiXG4iKS5zZWxlY3R7fHh8IHgubWF0Y2goL15ccyooI3tyb3V0ZXMuam9pbigifCIpfSlFP1xiLyl9KQogIGVuZAogIGFycml2YWxzLmZsYXR0ZW4uc29ydF9ieXt8eHwgKHh4PXguc3BsaXQoIiAiKVsxXSk9PSJOT1ciID8gMCA6IHh4LnRvX2kgfS5qb2luKCJcbiIpCmVuZApiYXNlX3VybCA9ICJodHRwOi8vd3d3Lm9uZWJ1c2F3YXkub3JnL3doZXJlL3RleHQvc3RvcC5hY3Rpb24/aWQ9MV8iCnVybHMgPSBBUkdWWzFdID8gQVJHVlsxXS5zcGxpdCgiLCIpLm1hcHt8c3wgYmFzZV91cmwrc30gOiBbYmFzZV91cmwgKyAiNjE5Il0KYnVzZXM9QVJHVlsyXSA/IEFSR1ZbMl0uc3BsaXQoIiwiKS5tYXAoJjp0b19pKSA6IFsiLioiXQpwdXRzIGdldF90YWJsZSh1cmxzLGJ1c2VzKQoK" "619" "18,17,15" |
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
plugins = [] | |
plugins.push( | |
description: "Creates an img tag for image urls so you can see the image inline" | |
text_only: true | |
match: [[ | |
/http(s)?:\/\/.+/gi, | |
(captures)-> | |
iframes = "" | |
for url in captures | |
try |
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
Dear Becker, | |
My name is Mr.Morgan Mawuto ,an Attorney at law, and the Personal lawyer to Mr.William A. Becker, He operated a | |
coded account with the Bank before he died on a motor accident on the 21st of April 2007, along with his wife their | |
two daughters. you have the same surname with him, I have a business inherited fund transaction of US$10.5Million, | |
(Ten Million And Five Hundred Thousand United States Dollars) which I need your assistance, please if you are | |
interested do contact me for more details on my personal email:( mawutomorgan@yahoo.com ), | |
Looking forward to receive your urgent response. |
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
ttest |
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
expr `date -j -f "%d/%m/%Y %H:%M:%S" "7/5/2012 09:54:00" "+%s"` - `date "+%s"` | awk '{ if( int( $1/86400 ) < 0 ) printf "@ Amazon for ⟶ %d days, " , int( $1/86400 ) ; if( int( $1/86400 ) < 0 || int( $1%86400/3600 ) < 0 ) printf "%d hours, " , int( $1%86400/3600 ) ; if( int( $1/86400 ) < 0 || int( $1%86400/3600 ) < 0 || int( $1%3600/60 ) < 0) printf "%d minutes, " , int( $1%3600/60 ) ; if( int( $1/86400 ) < 0 || int( $1%86400/3600 ) < 0 || int( $1%3600/60 ) < 0 || $1%60 < 0 ) printf "%d seconds" , $1%60 ; else printf "Hello!" }' | sed -E 's/-/ /' | sed -E 's/-/ /' | sed -E 's/-/ /' | sed -E 's/-/ /' |
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
http://tanin.nanakorn.com/b/92/amazon_ec2_setup_for_ruby_on_rails | |
sudo yum erase -y ruby rubygems | |
sudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel sqlite-devel sqlite curl-devel git ruby19-devel | |
sudo ln -s /usr/bin/ruby1.9 /usr/bin/ruby | |
sudo ln -s /usr/bin/gem1.9 /usr/bin/gem | |
sudo yum install -y aws-amitools-ec2 | |
sudo gem install passenger |
OlderNewer