- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce
method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List
is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
:root { | |
--ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53); | |
--ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
--ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22); | |
--ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06); | |
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035); | |
--ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335); | |
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); | |
--ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1); | |
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1); |
/** | |
* Traversing directory using promises | |
**/ | |
const traverseDirectory = (entry) => { | |
const reader = entry.createReader(); | |
return new Promise((resolveDirectory) => { | |
const iterationAttempts = []; | |
const errorHandler = () => {}; |
According to all known laws of aviation, there is no way a bee should be able to fly. | |
Its wings are too small to get its fat little body off the ground. | |
The bee, of course, flies anyway because bees don't care what humans think is impossible. | |
Yellow, black. Yellow, black. Yellow, black. Yellow, black. | |
Ooh, black and yellow! | |
Let's shake it up a little. | |
Barry! Breakfast is ready! | |
Coming! | |
Hang on a second. | |
Hello? |
// ---- triangle rasterizer | |
#define SUBPIXEL_SHIFT 8 | |
#define SUBPIXEL_SCALE (1 << SUBPIXEL_SHIFT) | |
static RADINLINE S64 det2x2(S32 a, S32 b, S32 c, S32 d) | |
{ | |
S64 r = (S64) a*d - (S64) b*c; | |
return r >> SUBPIXEL_SHIFT; | |
} |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This Github Actions workflow file lets you deploy multiple websites to Cloudflare Pages in subfolders instead of subdomains by using an intermediate repository to hold the built files.
- Create a new repository where the files will get deployed to. That is your build repo, and you should set up your Pages from that repo.
- Create a secret in your repo or organization called
DEPLOY_PAT
with the value of a GitHub personal access token of an account that has access to push to your build repo - Edit the values under
env
:- replace
AuthorNameGoesHere
with the author of the build repo - replace
BuildRepoNameGoesHere
with the name of the build repo - replace
UsernameOfPATGoesHere
with the username of the account you created the personal access token for
- replace
/* | |
NOTES | |
https://blog.scottlogic.com/2019/11/18/drawing-lines-with-webgl.html | |
EXAMPLE | |
const pnts = [ | |
-2,0,-2, | |
-2,0,2, | |
2,0,2, | |
4,0,0, |
/* | |
const pnts = [ | |
-2,0,-2, | |
-2,0,2, | |
2,0,2, | |
4,0,1, | |
]; | |
const poly = roundedline( pnts ); | |
const buf = new Vec3Buffer( poly ); |