This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.
Use it like this!
| # | A | B | C |
|---|---|---|---|
| 1 | a | b | slug |
| 2 | foo | baz bing | =slugify(A2:B4) |
| 3 | bar | BAZ | |
| 4 | FOO | baz-bing |
| //Promise.allSettled() vs Promise.all() | |
| //allSettled: returns when all promises have either resolved or rejected | |
| const getGitHubUser = async (usernames: []) => { | |
| const result = await Promise.allSettled( | |
| usernames.map(async (name: string) => { | |
| try { | |
| const response = await fetch( | |
| `https://api.github.com/users/${name}` | |
| ) |
| for i in *.heic; do sips -s format jpeg -s formatOptions best "${i}" --out "${i%heic}jpg" && touch -r "${i}" "${i%heic}jpg"; done |
| // Add on element with overflow | |
| -webkit-mask-image: -webkit-radial-gradient(white, black); |
This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.
Use it like this!
| # | A | B | C |
|---|---|---|---|
| 1 | a | b | slug |
| 2 | foo | baz bing | =slugify(A2:B4) |
| 3 | bar | BAZ | |
| 4 | FOO | baz-bing |