Skip to content

Instantly share code, notes, and snippets.

View jaygiang's full-sized avatar

Jay Giang jaygiang

  • San Diego, CA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jaygiang on github.
  • I am jgiang (https://keybase.io/jgiang) on keybase.
  • I have a public key ASA4fO7b51kykyj67_ElrIB9yjOW3lfO2-jwbuaVZSTB8Qo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jhoun on github.
  • I am jgiang (https://keybase.io/jgiang) on keybase.
  • I have a public key ASA4fO7b51kykyj67_ElrIB9yjOW3lfO2-jwbuaVZSTB8Qo

To claim this, I am signing this object:

@jaygiang
jaygiang / index.js
Last active September 10, 2019 17:59
Sum of Paired Indices
// Write a function in JavaScript that accepts an array of integers and a number X as parameters,
// when invoked, returns an array of unique indices of two numbers whose sum is equal to X.
// For example: [1, 3, 4, 5, 6, 8, 10, 11, 13], Sum: 14
// Pairs of indices: [0, 8], [1, 7], [2, 6], [4, 5]
const sumOfPairedIndices = (arr, sum) => {
const pairedIndices = [];
for (let i = 0; i < arr.length; i++){
for (let j = i + 1; j < arr.length; j++){
@jaygiang
jaygiang / instructions.md
Last active December 28, 2018 22:56
Instructions for Signing Up AWS Free Tier Account w/ Alerts

Signing up AWS Free Tier Account w/ Billing Alert

What is AWS?

Amazon Web Services(AWS) is a platform of cloud computing which provides a simple way to access servers, storage, databases and a broad set of applications. We are basically renting out AWS servers to host our application instead of having to maintain our own. There are many type of services in AWS, each performing a specific functionality.

Why use AWS?

Low Cost- As developers, we pay end up paying less if we want to host our application on AWS servers. Since AWS has many active users, it drives down the cost of server use.

@jaygiang
jaygiang / notes.md
Created October 5, 2018 01:38
AWS Certified Developer Notes (June 2018 Release)

Dynamo DB


General Info

  • DynamoDB is schemaless
  • use DynamoDb Stream when item is updated to primary table and also inserted into a secondary table
  • When looking for a good partition key use one with Automatically generated GUID
  • If large table, use queries instead of scans
  • In order to work with search queuries:
    • Specify a key condition expression in the query
  • Specify a partition key name and value in the equality condition
@jaygiang
jaygiang / readme.md
Last active September 24, 2018 23:09
Setting Up SSH account for multiple students

Generating SSH Keys

  1. Open Terminal
  2. Paste the text below, substituting in your GitHub email address.
ssh-keygen -t rsa -b 4096 -C "student_emaill@example.com"
  1. When you're prompted to "Enter a file in which to save the key," start with prefix id_rsa then students name.
Enter a file in which to save the key (/Users/you/.ssh/id_rsa): id_rsa_STUDENTNAME

EC2 Lab

Intro: You are an engineer for a CloudServices Inc. A client needs a new web server configured to host their application form.

Task: You are to use your knowledge of EC2 to create a highly scalable/available web server for the client with the following specs:

Region: US-West-2
AMI: Amazon Linux AMI
Instance Type: T2 Micro
Number of instances: 1

IAM Lab

Intro: You are working as a developer for Cloud Solutions inc. They recently acquired a new contract for Midwest Bank to set up their cloud infrastructure. Being a financial institution, security and access to their internal system is their main concern always. You have been tasked with the job to create their internal access roles for their in-house development team.

Task: You are to use your knowledge of IAM to create their access roles for each employee / groups of the company. Create the following:

Region: US-West-2

Groups:

  1. DevOps
@jaygiang
jaygiang / awsecr.md
Created May 23, 2018 21:36
Setting up AWS ECR
  1. Log into AWS Console
  2. Search AWS Service ECS
  3. Select Repositories from the left menu under "Amazon ECR"
  4. Select Create repository
  5. Retrieve the docker login command that you can use to authenticate your Docker client to your registry
aws ecr get-login --no-include-email --region us-west-2
  1. Run the docker login command that was returned in the previous step.

Keybase proof

I hereby claim:

  • I am jhoun on github.
  • I am jhoun (https://keybase.io/jhoun) on keybase.
  • I have a public key ASCbQqdB17bBngLNnjETSU6HR_fZL8tufywqGQQKXD2uOQo

To claim this, I am signing this object: