Setting up ElasticSearch with MongoDB
- https://coderwall.com/p/sy1qcw
- elasticsearch mongoDB
| # Description: | |
| # partychat like chat-score/leaderboard script built at 'SDSLabs' | |
| # we developed this to use in our 'Slack' team instance | |
| # | |
| # Commands: | |
| # listen for keyword++ or keyword-- in chat text and updates score for each | |
| # bot score keyword : returns current score of 'keyword' | |
| # | |
| # Examples: | |
| # : will update score for each, accordingly : |
| var i = 99 | |
| while i > 0 | |
| println(i + " bottles of beer on the wall, " + i + "bottles of beer.") | |
| var num = i - 1 | |
| if i == 1 { | |
| var num = "no more" | |
| } | |
| println("Take one down and pass it around, " + num + "bottles of beer on the wall.") | |
| println("No more bottles of beer on the wall, no more bottles of beer.") | |
| println("Go to the store and buy some more, 99 bottles of beer on the wall.") |
| #!/usr/bin/env bash | |
| # bash script to generate tree structure of a directory | |
| # Pravendra Singh (@hackpravj) | |
| pwd=$(pwd) | |
| find $pwd -print | sed -e "s;$pwd;\.;g;s;[^/]*\/;|__;g;s;__|; |;g" |
Setting up ElasticSearch with MongoDB