Skip to content

Instantly share code, notes, and snippets.

View nguyenit67's full-sized avatar
🚀
Aim for the best 💪💪💪

Nguyen Hoang Nguyen nguyenit67

🚀
Aim for the best 💪💪💪
View GitHub Profile
@nguyenit67
nguyenit67 / months.js
Last active October 8, 2021 02:11
auto-generates month names in languages
const months = [...Array(12).keys()].map(key => new Date(0, key).toLocaleString('en', { month: 'long' }))
@nguyenit67
nguyenit67 / command.cmd
Created October 21, 2021 13:19
re-enable WSL
sc config LxssManager start=auto
https://github.com/Microsoft/WSL/issues/3815#issuecomment-575927068
@nguyenit67
nguyenit67 / urlStringify.js
Created October 27, 2021 09:36
Encode a Javascript Object into a string that I can pass via a GET Request
const searchString = new URLSearchParams(object).toString();
https://stackoverflow.com/a/53171438/13835451
Only work for flat object, not nested ones
@nguyenit67
nguyenit67 / issue.md
Created November 4, 2021 12:26
how to unpublish or remove a extension from local Open VSX ?
@nguyenit67
nguyenit67 / src\\index.jsx
Created December 25, 2021 04:04
Component hierarchy order in src/index.js
ReactDOM.render(
<React.StrictMode>
<Provider store={store}>
<BrowserRouter>
<SnackbarProvider anchorOrigin={{ vertical: 'top', horizontal: 'right' }}>
<App />
</SnackbarProvider>
</BrowserRouter>
</Provider>
</React.StrictMode>,
@nguyenit67
nguyenit67 / Postman-Tests.js
Last active November 9, 2022 11:45
Postman JSON tree view visualizer show count of items in array or keys in an object using `jquery.json-viewer`
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>
@nguyenit67
nguyenit67 / Postman-JSONPathPicker.js
Created January 22, 2022 17:14
Postman JSON Path Picker visualizer
const responseJson = pm.response.json();
const resJsonString = JSON.stringify(responseJson);
const template = `
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/jsonpath-picker.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/jsonpath-picker.min.js"></script>
<style>
pre {
height: 90vh;
@nguyenit67
nguyenit67 / Postman-big-json-viewer.js
Last active April 16, 2022 14:46
Postman visualizer for large JSON data in the browser.
const responseJson = pm.response.json();
const resJsonString = JSON.stringify(responseJson);
const template = `
<link rel="stylesheet" href="https://unpkg.com/big-json-viewer/dist/default.css">
<script src="https://unpkg.com/big-json-viewer/dist/browser-api.js"></script>
<style>
body {
height: 100vh;

Setting up Webpack for any Typescript project from Scratch

Welcome to step by step hands-on guide to setup webpack in your upcoming typescript project. Please follow the steps and you should be able to create your own webpack project. Please download the source code from github.

You will learn below things:

  1. ✅Create a Typescript node.js project.
  2. ✅Install Dependencies with webpack & typescripts.
  3. ✅Use Webpack CLI to crate webpack.config.js file and modify webpack.config.js based on our need.
async function searchManga(title) {
const result = await (await fetch(`https://api.mangadex.org/manga?title=${encodeURI(title)}`)).json();
return result.results.map(v => v.data)
}
async function getChapters(mangaID) {
const result = await (await fetch(`https://api.mangadex.org/chapter/?manga=${mangaID}&limit=50`)).json();
return result.results;
}
async function getChapterInfo(chapterID) {
const result = await (await fetch(`https://api.mangadex.org/chapter/${chapterID}`)).json();