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
daemon off; | |
worker_processes 1; | |
events { worker_connections 1024; } | |
http{ | |
sendfile on; |
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 | |
# Copy ~/.ssh/id_rsa.pub into Host Server | |
# Note: By default it will use `ubuntu` as os user, feel free to change this | |
# | |
# Suppyly instance id and availability zone as script argument | |
# e.g ./copy-pub-key.sh instance-1234 ap-southeast-1 | |
current_dir=pwd | |
instance_id=$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 | |
# Fetch and Filter Running EC2 Instance by name | |
# https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html | |
# Query: | |
# Name: Instance Name | |
# DnsName: Public DNS Name | |
# State: Instance State | |
# AZ: Availability Zone | |
# Filter: | |
# Filter by name |
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
# This is a sample build configuration for JavaScript. | |
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples. | |
# Only use spaces to indent your .yml configuration. | |
# ----- | |
# You can specify a custom docker image from Docker Hub as your build environment. | |
# Note variables start with `$` are repository variables added to bitbucket repo. | |
image: node:12.18.2 | |
pipelines: | |
branches: |
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
require "graphql/client" | |
require "graphql/client/http" | |
class GraphqlClient::Base | |
# Configure GraphQL endpoint using the basic HTTP network adapter. | |
endpoint = ENV.fetch("GRAPHQL_ENDPOINT") | |
HTTP = GraphqlClient::CustomHTTP.new(endpoint) | |
# Fetch latest schema on init, this will make a network request |
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 JAVA | |
$ sudo apt-get update && sudo apt-get install default-jre | |
INSTALL ELASTIC SEARCH https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html | |
$ wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
$ echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list | |
$ sudo apt-get update && sudo apt-get install elasticsearch | |
$ sudo update-rc.d elasticsearch defaults 95 10 | |
$ sudo service elasticsearch restart | |
$ sudo service elasticsearch status |