My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
This file contains hidden or 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
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands | |
# cat paths | |
/_cat/allocation | |
/_cat/shards | |
/_cat/shards/{index} | |
/_cat/master | |
/_cat/nodes | |
/_cat/indices | |
/_cat/indices/{index} |
curl -X<REST Verb> <Node>:<Port>/<Index>/<Type>/<ID>
This file contains hidden or 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
# supervisor | |
# | |
# Author: Günter Grodotzki <gunter@grodotzki.co.za> | |
# Version: 2015-04-25 | |
# | |
# set param "SUPERVISE=enable" to activate | |
# | |
packages: | |
yum: | |
python27-setuptools: [] |
This is a document for managing LetsEncrypt certificates on AWS using AWS Certificate Manager and configuring on CloudFront using the AWS CLI.
Follow the instructions to set up the certbot
and aws
commands on your local machine:
Our db is hosted on Amazon. Our web server can connect to the db. Connections to the db are not allowed outside of the web server.
This creates a tunnel from my local machine to the web server:
ssh -N -L 3307:my-rds-db.us-east-1.rds.amazonaws.com:3306 ec2-my-web-server.compute-1.amazonaws.com
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
/** | |
* @param $url | |
* The URL to encode | |
* | |
* @return | |
* A string containing the encoded URL with disallowed | |
* characters converted to their percentage encodings. | |
*/ | |
function encode_url($url) { | |
$reserved = array( |
NewerOlder