Skip to content

Instantly share code, notes, and snippets.

View mahi424's full-sized avatar

Mahaveer Chouhan mahi424

View GitHub Profile
@mahi424
mahi424 / README-Template.md
Created April 2, 2018 18:51 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

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.

Prerequisites

@mahi424
mahi424 / 1-1000.txt
Created December 22, 2018 08:44 — forked from deekayen/1-1000.txt
1,000 most common US English words
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 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