PUT /orders
{
"mappings": {
"properties": {
"lines": {
"type": "nested",
"properties": {
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
#!/bin/bash | |
#### | |
# Note: bucket name and the region can be changed | |
# Reffer below links for more details: | |
# https://docs.aws.amazon.com/codedeploy/latest/userguide/resource-kit.html#resource-kit-bucket-names | |
# https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-linux.html | |
#### | |
CODE_DEPLOY_BUCKET_NAME=aws-codedeploy-us-east-1 | |
REGION=us-east-1 |
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
#!/bin/bash | |
########## | |
# Create python3 virtual environment | |
# eg: ./create-virtual-env.sh /Users/Admin/python-envrontments/my-new-project-env | |
# It will create new python3 virtual environment on specified path | |
# So later you can activate the environment by having `source /Users/Admin/python-envrontments/my-new-project-env/bin/activate` | |
########## | |
if (( $# == 0)) |
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
# | |
# Install docker in amazon linux ec2 instance | |
# | |
### Docker | |
sudo amazon-linux-extras install docker -y | |
sudo yum install docker -y |
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
# Credit: https://medium.com/swlh/how-to-connect-to-mongodb-using-a-promise-on-node-js-59dd6c4d44a7 | |
const config = require('config'); | |
const MongoClient = require('mongodb').MongoClient; | |
var _connection; | |
var _db; | |
const closeConnection = () => { | |
_connection.close(); | |
} |
docker run -d -p 3000:3000 -e "GF_SECURITY_ADMIN_PASSWORD=admin" --name grafana -v grafana-storage:/var/lib/grafana --net mynet grafana/grafana
Create read-only MySQL user