Description |
const uuid4to7 = (uuid, now = Date.now()) => { | |
const ts = now.toString(16).padStart(12, `0`) | |
return `${ts.slice(0, 8)}-${ts.slice(8)}-7${uuid.slice(15)}` | |
} | |
// generate new UUIDv7 | |
uuid4to7(crypto.randomUUID()) | |
// Conforms to example in the spec RFC9562 A.6 |
# 20x faster replacement for "npm run" | |
# - It supports scripts executing a built-in shell function | |
# - It supports scripts executing a binary found in PATH | |
# - It supports scripts executing a binary found in node_modules | |
# - It supports passing arguments and options to scripts | |
# - It supports reading scripts either via ripgrep (fast) or via jq (slower, but safer) | |
# - It adds ./node_modules/.bin to the $PATH | |
# - It handles gracefully when a script has not been found | |
# - It handles gracefully when "&", "&&", "|", "||", or ENV variables are used, falling back to "npm run" |
Packaging JavaScript applications can be a bit overwhelming. The popular project uglifyjs does not support ES6, it is cumbersome to configure the allmighty Webpack, bundlers like Parcel and Microbundle still have bugs or do not compile to ESM bundles that work in a browser. It is hard to figure out the best way to bundle an application.
Here I give a small example, how we achieve the goal using the
- TypeScript compiler
- rollup.js bundler
Moved to Shopify/graphql-design-tutorial
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
#!/bin/bash | |
# | |
# Author: SuperPaintman <[email protected]> | |
# | |
### | |
# Constants | |
### | |
RETVAL=0 |