Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
| alexcvzz.vscode-sqlite | |
| andys8.jest-snippets | |
| apollographql.vscode-apollo | |
| austincummings.razor-plus | |
| bobsparadox.seti-black | |
| BriteSnow.vscode-toggle-quotes | |
| christian-kohler.npm-intellisense | |
| christian-kohler.path-intellisense | |
| CoenraadS.bracket-pair-colorizer | |
| dbaeumer.vscode-eslint |
| function hashStringToInt(s, tableSize) { | |
| let hash = 17; | |
| for (let i = 0; i < s.length; i++) { | |
| hash = (13 * hash * s.charCodeAt(i)) % tableSize; | |
| } | |
| return hash; | |
| } |
| [ | |
| { | |
| "code": [ | |
| "1f600" | |
| ], | |
| "name": "grinning face" | |
| }, | |
| { | |
| "code": [ | |
| "1f603" |
| // Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
| // Remove any duplicates from an array of primitives. | |
| const unique = [...new Set(arr)] | |
| // Sleep in async functions. Use: await sleep(2000). | |
| const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
| // or | |
| const sleep = util.promisify(setTimeout); |
| let regex; | |
| /* matching a specific string */ | |
| regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
| regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
| regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
| /* wildcards */ | |
| regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
| regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
| function logColor(color, args) { | |
| console.log(`%c ${args.join(' ')}`, `color: ${color}`); | |
| } | |
| const log = { | |
| aliceblue: (...args) => { logColor('aliceblue', args)}, | |
| antiquewhite: (...args) => { logColor('antiquewhite', args)}, | |
| aqua: (...args) => { logColor('aqua', args)}, | |
| aquamarine: (...args) => { logColor('aquamarine', args)}, | |
| azure: (...args) => { logColor('azure', args)}, |
rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)