Skip to content

Instantly share code, notes, and snippets.

View vs-zhang-jenkins's full-sized avatar

vs-zhang-jenkins

View GitHub Profile
@vs-zhang-jenkins
vs-zhang-jenkins / gist:b24c0e2a77845c4c53138b5282ff5903
Created October 23, 2017 04:43 — forked from oslego/gist:f13e136ffeaa6174289a
create self-signed certificate for localhost
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@vs-zhang-jenkins
vs-zhang-jenkins / example.sh
Created September 4, 2017 22:29 — forked from karmi/example.sh
A simple Elasticsearch example
# Let's delete the index first
curl -X DELETE localhost:9200/people
# Create an index with specific settings
curl -X POST localhost:9200/people -d '{
"settings" : {
"index" : { "number_of_shards" : 1, "number_of_replicas" : 0 }
}
}'