Skip to content

Instantly share code, notes, and snippets.

View nikkaroraa's full-sized avatar
👨‍💻
building!

nikhil nikkaroraa

👨‍💻
building!
View GitHub Profile
@nikkaroraa
nikkaroraa / docker-help.md
Created August 25, 2018 18:21 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@nikkaroraa
nikkaroraa / aws.md
Created March 29, 2019 17:39
aws.md
@nikkaroraa
nikkaroraa / lifecycle-of-web-app.md
Created March 29, 2019 17:41
lifecycle-of-web-app.md

Lifecycle of a web-app

Browser-side and Server-side

Client makes a request from the browser which then goes to the server to fetch some resources. The server is a really complex thing that does all the logic handling, computations and provides us with the things that we eventually want to show on the website. That covers authorization, authentication and interaction with the database. Authentication

  • Authentication is the process of verifying who you are. When you log on to a PC with a user name and password you are authenticating.
@nikkaroraa
nikkaroraa / rem-unit.md
Created March 29, 2019 17:46
rem-unit.md

What is REM in CSS?

Hey guys, I was talking to Bo and we were thinking about start using rem unit on the projects, because it's more responsible.

The main difference between rem and em is that em is relative to element's closest parent font-size, e.g:

HTML:

@nikkaroraa
nikkaroraa / createResolver.js
Created February 21, 2020 11:00
create resolver (GraphQL HOC)
const createResolver = (resolver) => {
const baseResolver = resolver;
baseResolver.createResolver = (childResolver) => {
const newResolver = async (parent, args, context, info) => {
await resolver(parent, args, context, info);
return childResolver(parent, args, context, info);
};
return createResolver(newResolver);
};
return baseResolver;
@nikkaroraa
nikkaroraa / kms-encryption-command.txt
Created March 20, 2020 13:16
Google KMS encryption command
echo -n <variable> | gcloud kms encrypt --plaintext-file=- --ciphertext-file=- --location=global --keyring <keyring> --key <key> | base6
4
@nikkaroraa
nikkaroraa / cloudflare-and-vercel.md
Last active September 18, 2020 07:35
How to setup Vercel with Cloudflare?

Setting up Vercel with Cloudflare

  • Go to "Domains" section in Vercel
  • Type out your domain, and click on "Add"
  • It'll give you an "A" record to enter in the DNS settings
  • Navigate to the Cloudflare dashboard
    • From there go to DNS, and add the A record there with Proxy status being set to "true"
    • I also had an "A" record which was pointing to Namecheap, since I bought the domain from there. Make sure to remove that.
      • "A" record is basically an Address record that maps the domain name to the IP address of the computer hosting the domain
  • Add a CNAME record to handle "www"
@nikkaroraa
nikkaroraa / ec2.md
Created September 18, 2020 07:36
Foundations of EC2 (Elastic Compute Cloud)

Amazon EC2 (Elastic Compute Cloud)

Credits

Video: https://www.youtube.com/watch?v=kMMybKqC2Y0

Overall layout of EC2

  • Each AWS region contains multiple availability zones

  • Each availability zone has got its own networking domain, power domain, cooling subsystems

@nikkaroraa
nikkaroraa / elastic-beanstalk.md
Created September 18, 2020 07:38
Elastic Beanstalk

Elastic Beanstalk

Common use cases

  • Setup infrastructure for your web app
  • Create your application on a broad set of curated platforms
  • Scale infra for your app based on demand
  • Automatically apply patches and security fixes
  • Load-balance traffic for higher availability
  • Monitor the health of your app