- alefragnani.Bookmarks
- bradlc.vscode-tailwindcss
- ChakrounAnas.turbo-console-log
- CoenraadS.bracket-pair-colorizer
- dbaeumer.vscode-eslint
- donjayamanne.githistory
- dsznajder.es7-react-js-snippets
- eamodio.gitlens
- Equinusocio.vsc-community-material-theme
- Equinusocio.vsc-material-theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import cx from "classnames"; | |
const Label = ({ children }) => { | |
return ( | |
<label className="mb-3 w-full font-semibold text-gray-600"> | |
{children || "Label"} | |
</label> | |
); | |
}; | |
const ErrorLabel = ({ children }) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"recommendations": [ | |
"dbaeumer.vscode-eslint", | |
"esbenp.prettier-vscode", | |
"VisualStudioExptTeam.vscodeintellicode", | |
"johnpapa.vscode-peacock" | |
] | |
} |
It was a pain for me to figure out how to debug TS in VSCode. Creating this doc for my reference and it might help you as well.
"sourceMap": true, /* SUPER-DUPER Important Generates corresponding '.map' file. */
"outFile": "./", /* Concatenate and emit output to single file. */
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -maxdepth 2 -name node_modules -type d -mtime +60 -exec rm -rf {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PrivateRoute = ({ component: Component, ...args }) => { | |
// user is the authenticated user pulled from the React Context | |
const { user } = useContext(AuthContext); | |
return ( | |
<Route | |
{...args} | |
render={props => { | |
return user ? ( | |
<Component {...props} /> |
- docker container
- run --publish 80:80 --detch --name {custom_container_name} nginx
- ls [list all the running containers]
- ls -a [list all the containers installed]
- stop {container_id} {give upto 3 characters of the container} [Stops the running container]
- rm {container_id} [Remove the stoppped container]
- rm -f [Remove any container; stopped or running] [Not recommended]
- top (container_name) [displays the running process of the container]
- inspect (conatiner_name) [details of the container config]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGINNER'S GUIDE TO THE BASH TERMINAL | |
NAVIGATION | |
ls - list directory contents | |
pwd - print name of current/working directory | |
cd - change working directory | |
pushd/popd - put working directory on a stack | |
file - determine file type | |
locate - find files by name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./permission"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Write a BFS program using adjacency list and queue | |
*/ | |
#include<iostream> | |
#include<list> | |
#include<queue> | |
#include<stack> | |
using namespace std; | |
class Graph{ | |
private: |