Skip to content

Instantly share code, notes, and snippets.

View aditya-kapre-shrewsbury's full-sized avatar

Aditya Kapre aditya-kapre-shrewsbury

View GitHub Profile
Install and run react locally
=============================
- Detailed way
- https://medium.com/@vikasharry03/react-setup-on-local-computer-912f9a551af3
- Easy way
- https://www.freecodecamp.org/news/install-react-with-create-react-app/
- Babel compiles JSX down to React.createElement() calls
- React elements are immutable. Once you create an element, you can’t change its children or attributes. An element is like a single frame in a movie: it represents the UI at a certain point in time.
Visual studio code
------------------
- Install these plugins
- Live server
- Prettier
- eslint
- What is Javascript runtime ?
https://www.codecademy.com/article/introduction-to-javascript-runtime-environments
- system design
user -> loadbalancer -> application/frontend server -> backendserver -> cache -> database
JPA vs Hibernate vs SpringDataJPA
---------------------------------
JPA : Java persistence api which provide specification for persisting, reading, managing data
from your java object to relations in database.
Hibernate: There are various provider which implement jpa. Hibernate is an implementation of JPA.
So we have other provider (implementations) too. But if using jpa with spring it allows you to switch to different
providers in future.
sudo apt install nodejs
npm install -g @angular/cli
Create new project
------------------
ng new sample-project
Start webserver
---------------
- UI Design Patterns
- Toolbar
- has search button etc
- can add child views
- embedd brands color
- App bar
- top of screen
- screen title
- screen level navigation option
- height is extensible
- Functional Dependency
- A -> B
- B is functionally dependent on A since value of B can be found if value of A is known
- (a, b) -> c
- c is functionally dependent on values of a & b
- Keys
- Super key
- When value of all other attributes in a can be found using value of this attribute,
this attribute is super key
- REST
- architectural style, not a standard
- representational state transfer
- stateless
- Principle
- Resources (urls w/ directory structure)
- Respresentation
- JSON/XML
- Messages (GET, PUT, POST, DELETE, HEAD, PATCH)
View docker containers running
------------------------------
- docker stats
View logs in docker container
-----------------------------
- docker logs {container_id_from_docker_stats_command}
Stop all docker containers
--------------------------
AWS Log driver
--------------
To send container logs to CloudWatch
------------------------------------
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html#specify-log-config