- iTerm 2
- oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh)
- VSCode
Cross-origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell a browser to let a web app running at one origin have permission to access selected reosurces from a server at a different origin.
- Access-Control-Allow-Origin: http://foo.example
- Access-Control-Allow-Methods: POST, GET, OPTIONS
- Access-Control-Allow-Headers: X-PINGOTHER, Content-Type
- Access-Control-Max-Age: 86400
-
Reach Router: https://reach.tech/router/credits
-
React Router
-
Good SO post: https://stackoverflow.com/questions/53174202/how-to-mock-a-function-in-jest
-
Good Medium post: https://medium.com/@qjli/how-to-mock-specific-module-function-in-jest-715e39a391f4
-
Good discussion here: jestjs/jest#936 (comment)
-
Personal experience
-
import the module as a whole. for instance, import * as Blah from '../blah';
-
const mock = jest.spyOn(Blah, '<mocked_function_name>');
-
mock.mockImplementationOnce( () => {});
BIOS (on the motherboard) -> Boot loader(e.g. GRUB -Grand Unified Boot Loader) -> Loads linux kernel -> start init/systemd -> start daemons, background processes and services required for OS
docker ps -a docker stop $(docker ps -aq) docker rm docker rmi docker container ls docker container kill
Network 5 layers:
At the very bottom of the network stack is the physical layer. This is where electrical signals or light pulses or radio waves actually transmit information from place to place. The physical layer doesn't really have protocols, but instead has standards for voltages, frequencies, and other physical properties. You can transmit information directly this way, but you need a lot of power or a dedicated line, and without higher layers you won't be able to share bandwidth.
The next layer up is the link layer. This layer covers communication with devices that share a physical communications medium. Here, protocols like Ethernet, 802.11a/b/g/n, and Token Ring specify how to handle multiple concurrent accesses to the physical medium and how to direct traffic to one device instead of another. In a typical home network, this is how your computer talks to your home "router."
The third layer is the network layer. In the majority of cases, this is dominated by Internet Protocol (IP). This is whe