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
// https://www.iso.org/iso-3166-country-codes.html > click Online Browsing Platform > 300 results per page | |
// copy-paste below in console | |
var table = document.evaluate("/html/body/div[1]/div/div[2]/div/div/div[2]/div/div/div[2]/div/div/div/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[2]/div[2]/div[3]/table", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
var countries=[]; | |
for (var i = 1; i<table.rows.length; i++) { | |
var row = table.rows[i]; | |
var country={}; | |
for (var j = 0; j<row.cells.length; j++) { | |
var col=row.cells[j]; |
Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.
<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />
Clearable version:
<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} isClearable={true} />
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
// These hashes are for algorithmic use cases, such as bucketing in hashtables, where security isn't | |
// needed and 32 or 64 bits is enough (that is, rare collisions are acceptable). These are way simpler | |
// than sha1 (and all its deps) or similar, and with a short, clean (base 36 alphanumeric) result. | |
// A simple, *insecure* 32-bit hash that's short, fast, and has no dependencies. | |
// Output is always 7 characters. | |
// Loosely based on the Java version; see | |
// https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript | |
const simpleHash = str => { | |
let hash = 0; |
- Go into VSCode
- Install typescript
npm i typescript
for local ORnpm i -g typescript
for global - Run either
node_modules/.bin/tsc --init
for local installation ortsc --init
for global - Open the generated file
tsconfig.json
and pressCTRL+F
- Make sure to tick the regex filter for search on the far right of the search input (third icon)
- Pase that regex
\s* \/\* .* \*\/
- Replace by "nothing"
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
Name | Stars | Last Commit | Description |
---|---|---|---|
three.js | ![GitHub |