curl -X POST "http://localhost:8080/admin/delete-extension?token={token}&namespace={namespace}&extension={extension}" The endpoint is defined in AdminAPI
This file contains hidden or 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 responseJson = pm.response.json(); | |
| const resJsonString = JSON.stringify(responseJson); | |
| const template = ` | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/json-viewer/jquery.json-viewer.css"> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/json-viewer/jquery.json-viewer.js"></script> |
This file contains hidden or 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
| ReactDOM.render( | |
| <React.StrictMode> | |
| <Provider store={store}> | |
| <BrowserRouter> | |
| <SnackbarProvider anchorOrigin={{ vertical: 'top', horizontal: 'right' }}> | |
| <App /> | |
| </SnackbarProvider> | |
| </BrowserRouter> | |
| </Provider> | |
| </React.StrictMode>, |
This file contains hidden or 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 searchString = new URLSearchParams(object).toString(); | |
| https://stackoverflow.com/a/53171438/13835451 | |
| Only work for flat object, not nested ones |
This file contains hidden or 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
| sc config LxssManager start=auto | |
| https://github.com/Microsoft/WSL/issues/3815#issuecomment-575927068 |
This file contains hidden or 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 months = [...Array(12).keys()].map(key => new Date(0, key).toLocaleString('en', { month: 'long' })) |
This file contains hidden or 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 LEN = 1000; | |
| // First choice | |
| [...Array(12).keys()] | |
| // Another choice | |
| Array.from({length: LEN}) | |
| Array.from(Array(LEN)) | |
This file contains hidden or 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
Show hidden characters
| { | |
| "compilerOptions": { | |
| "module": "es6", | |
| "target": "es6", | |
| "baseUrl": "src", | |
| "moduleResolution": "node" | |
| }, | |
| "include": ["src/**/*"] | |
| } |
src
|__ assets
| |__ images
| |__ styles (global styles)
|
|__ components (shared components)
|
|__ features
|__ Photo
This file contains hidden or 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
| // #1 catch in promise-based | |
| await step1().catch(fun); | |
| async function gettingBetter() { | |
| const a = await step1().catch(err => handle(err)); | |
| const b = await step2().catch(err => handle(err)); | |
| const c = await step3().catch(err => handle(err)); | |
| } | |
| // #2 create a function handle try catch => [data, error] | |
| async function awesome() { |