One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
the | |
of | |
to | |
and | |
a | |
in | |
is | |
it | |
you | |
that |
const fs = require('fs'); | |
// Load the AWS SDK for Node.js | |
const AWS = require('aws-sdk'); | |
// Please export credentials in shell | |
/* | |
export AWS_ACCESS_KEY_ID="<AWS_ACCESS_KEY_ID>" | |
export AWS_SECRET_ACCESS_KEY="<AWS_SECRET_ACCESS_KEY>" | |
export AWS_SESSION_TOKEN="<AWS_SESSION_TOKEN>" | |
*/ |
class LiquidityPool { | |
constructor(type1, supplyOfType1, type2, supplyOfType2) { | |
this.type1 = type1; | |
this.supplyOfType1 = supplyOfType1; | |
this.type2 = type2; | |
this.supplyOfType2 = supplyOfType2; | |
this.poolConstant = supplyOfType1 * supplyOfType2; | |
} | |
exchange(_type, quantityOffered) { | |
let toReturn = 0; |
function update_sys { | |
echo 'updating...' | |
sudo apt update | |
sudo apt upgrade -y | |
} | |
function install_nginx { | |
echo 'installing nginx' | |
sudo apt install nginx-full -y | |
sudo mv /etc/nginx/sites-enabled/default /etc/nginx/sites-enabled/default.bak |
Create assetlinks JSON using below link
https://developers.google.com/digital-asset-links/tools/generator
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
#create build | |
npm run build | |
# Enable printing executed commands | |
set x | |
trap "exit" INT | |
# Get AWS PROFILE, S3 Bucket and CloudFront Id from environment variables or write it down statically | |
aws_profile=<aws_profile> | |
s3_bucket=<s3_bucket> |
#!/bin/bash | |
# specify the server to ssh into | |
server=site | |
ssh $server << 'EOF' | |
branch=master | |
directory=/home/ubuntu/projects/primathon-ember-web | |
app_name=prima-web | |
function install_docker { | |
echo 'installing Docker...' | |
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |
./create-role.sh | |
ROLE_ARN = arn:aws:iam::<YOUR_ACCOUNT_ID>:role/ec2SchedulerRole |