Skip to content

Instantly share code, notes, and snippets.

View chalkWood's full-sized avatar
💭
oO/

Priyank_ chalkWood

💭
oO/
View GitHub Profile
@chalkWood
chalkWood / v8.md
Created December 8, 2019 09:27 — forked from kevincennis/v8.md
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • sudo nano ~/.bash_profile
  • Add export PATH=/path/to/depot_tools:"$PATH" (it's important that depot_tools comes first here)
@chalkWood
chalkWood / enzyme_render_diffs.md
Created October 14, 2019 05:25 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@chalkWood
chalkWood / # HTTP and Servers.md
Created August 10, 2019 08:01
Talks About HTTP and Servers (WIP)

HTTP and Servers

  • Error code 404 - Resource not found
  • Inbuilt python demo Web server:
    • python3 -m http.server 8000
  • Error Codes - w3.org
  • A server is just a program that accepts connections from other programs on the network
  • A web address is also called a URI for Uniform Resource Identifier
  • The term URL - Uniform Resource Locator. A URL is a URI for a resource on the network
  • URI - is a name for a resource

Replacing Redux

What is useReducer Hook ? An alternative to useState. Accepts a reducer of type (state, action) => newState

const [state, dispatch] = useReducer(reducer, initialArg, init);

HTTP

Hyper Text Transfer Protocol : Sending / recieving the text is the motto

  • Request Section
    • 1'st line gives the request URL and type of request
    • Header Section
      • Host header is the Required header
      • Headers is the Meta Data for the request itself
@chalkWood
chalkWood / BFS.Musings.md
Last active July 20, 2019 15:40
Notes on BFS

BFS Musings

MIT

Graph Search

  • explore a graph
  • Graph = (V,E)

Note: V = Set of vertices / E = Set of edges

@chalkWood
chalkWood / Redux.md
Last active July 19, 2019 21:04
Middleware - Frontend

Redux Musings

  • Middleware is some code you can put between the framework receiving a request, and the framework generating a response**
  • The best feature of middleware is that it's composable in a chain. You can use multiple independent third-party middleware in a single project.
  • Redux provides a third-party extension point between dispatching an action, and the moment it reaches the reducer

How can we do it on our own ?

  • How to dispatch action and fix monkey patching

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?