Skip to content

Instantly share code, notes, and snippets.

View fabiancook's full-sized avatar
🏠
Working on Open Source and some other bits!

Fabian Cook fabiancook

🏠
Working on Open Source and some other bits!
View GitHub Profile

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"

npm adduser

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"

npm adduser

function corrugatedVectors(options) {
const length = lengthToPixel(options.length),
troughLength = lengthToPixel(options.troughLength),
ridgeLength = lengthToPixel(options.ridgeLength),
ridgeHeight = lengthToPixel(options.ridgeHeight),
offsetY = lengthToPixel(options.offsetY),
offsetX = lengthToPixel(options.offsetX),
offsetZ = lengthToPixel(options.offsetZ),
ridgeAngle = options.ridgeAngle,
angle = options.angle,

Keybase proof

I hereby claim:

  • I am fabiancook on github.
  • I am fabiancook (https://keybase.io/fabiancook) on keybase.
  • I have a public key ASDPw2qRyw4A7r51up5VBbHM_ZB_I3o-OIMS6gqewS86HQo

To claim this, I am signing this object:

import { useRef } from "react";
export default function useAfterRender(fn) {
const value = {};
const ref = useRef(value);
if (ref.current === value) {
return;
}
return fn();
}