List of useful npx (NPM Package Runner) commands.
Using NPX we can execute/run node binaries without the need to install it locally or globally.
| # Source | |
| Original source no longer exists but was apparently: | |
| http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT, | |
| based on a stackoverflow discussion: | |
| https://stackoverflow.com/a/9150427/2184122 | |
| There are several authors. I am capturing the file because I think it is of great value. However, I am happy to remove it if requested. | |
| The authors are: Lee Daniel Crocker, Paul Boulay, and Mike Morra | |
List of useful npx (NPM Package Runner) commands.
Using NPX we can execute/run node binaries without the need to install it locally or globally.
| // Use your MDX content with this component. | |
| import React from 'react' | |
| import MDX from '@mdx-js/runtime' | |
| import components from '../utils/markdown/markdown' | |
| // Renders a cimple loading spinner as a test | |
| import Loading from './Loading' | |
| const mdxComponents = { |
| diff --git a/node_modules/three/examples/js/loaders/DRACOLoader.js b/NodeDRACOLoader.js | |
| index 57767d7..cc46f2c 100644 | |
| --- a/node_modules/three/examples/js/loaders/DRACOLoader.js | |
| +++ b/NodeDRACOLoader.js | |
| @@ -14,10 +14,12 @@ | |
| // | |
| 'use strict'; | |
| +const decoder = require('draco3dgltf').createDecoderModule(); | |
| + |
| const io = require('socket.io-client'); | |
| const socket = io('http://localhost:3000', { | |
| transportOptions: { | |
| polling: { | |
| extraHeaders: { | |
| 'Authorization': 'Bearer abc', | |
| }, | |
| }, | |
| }, |
This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).
This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"| // why do this? clip-path accepts a `url` reference to an svg element, right? | |
| // the difference is that anything defined as a `basic-shape` can be animated: | |
| // https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path | |
| const input = `121.151,20.761 170.165,55.885 200.872,3.816 231.145,55.884 280.592,20.762 286.854,80.687 346.526,68.666 | |
| 327.657,126.005 387.276,139.247 346.502,184 395.796,220.302 340.127,244.647 370.611,297.814 309.636,297.457 316.076,358.381 | |
| 260.303,333.3 241.622,391.529 200.655,345.979 160.121,391.53 141.008,333.302 85.666,358.381 91.673,297.456 31.131,297.813 | |
| 61.183,244.647 5.947,220.302 54.81,184 14.466,139.248 73.652,126.004 55.216,68.667 114.457,80.688 ` | |
| const viewBoxScale = 4 |
| // based on the math here: | |
| // http://math.stackexchange.com/a/1367732 | |
| // x1,y1 is the center of the first circle, with radius r1 | |
| // x2,y2 is the center of the second ricle, with radius r2 | |
| function intersectTwoCircles(x1,y1,r1, x2,y2,r2) { | |
| var centerdx = x1 - x2; | |
| var centerdy = y1 - y2; | |
| var R = Math.sqrt(centerdx * centerdx + centerdy * centerdy); | |
| if (!(Math.abs(r1 - r2) <= R && R <= r1 + r2)) { // no intersection |
| export interface IPackageJSON extends Object { | |
| readonly name: string; | |
| readonly version?: string; | |
| readonly description?: string; | |
| readonly keywords?: string[]; |