I hereby claim:
- I am mcos on github.
- I am mcos (https://keybase.io/mcos) on keybase.
- I have a public key ASDhFkDvIIMc8TDgtJq1nolHX2sVttNcFQTTGBU88cXUNgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| package main | |
| import ( | |
| "crypto/rand" | |
| "fmt" | |
| ) | |
| func randStr(strSize int) string { | |
| dictionary := "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" |
| #!/bin/sh | |
| # Copyright 2014 Robin Powered Inc. | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| #!/bin/sh | |
| # Copyright 2014 Robin Powered Inc. | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| #!/bin/sh | |
| # Copyright 2014 Robin Powered Inc. | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| cd ~ | |
| sudo yum update | |
| sudo yum install java-1.7.0-openjdk.i686 -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
| #!/bin/bash | |
| # Script used to setup elasticsearch. Can be run as a regular user (needs sudo) | |
| ES_USER="elasticsearch" | |
| ES_GROUP="$ES_USER" | |
| ES_HOME="/usr/local/share/elasticsearch" | |
| ES_CLUSTER="clustername" | |
| ES_DATA_PATH="/var/data/elasticsearch" | |
| ES_LOG_PATH="/var/log/elasticsearch" | |
| ES_HEAP_SIZE=1024 |
| class HttpBase(object): | |
| def __init__(self, base_url, api_key): | |
| self.base_url=base_url | |
| self.api_key=api_key | |
| self.headers = {'Content-Type': 'application/json', | |
| 'Accepts': 'application/json'} | |
| self.http = httplib2.Http() | |
| def get(self, path, data=None): |