Skip to content

Instantly share code, notes, and snippets.

View willcode4food's full-sized avatar

Marc Arbesman willcode4food

View GitHub Profile
// Empty
[
{
"key": "ctrl+shift+l",
"command": "editor.action.insertCursorAtEndOfEachLineSelected",
"when": "editorTextFocus"
},
{
"key": "shift+cmd+l",
"command": "-editor.action.insertCursorAtEndOfEachLineSelected",
@willcode4food
willcode4food / calcViewBox.js
Last active August 29, 2019 13:59
Calculate Dynamic Aspect Ratio
// Thanks Kyle Mavis!!
const calcViewBox = ({width=0, heigth=0, baseWidth=0, baseHeight=0}) => {
const defaultAspect = baseWidth / baseHeight;
const targetAspect = width / height;
if (targetAspect > defaultAspect) {
const height = baseHeight * (defaultAspect / targetAspect);
const y = (baseHeight - height) / 2;
return `0 ${y} ${baseWidth} ${height}`;
@willcode4food
willcode4food / cloudSettings
Last active March 5, 2021 21:31
Visual Studio Code Settings Sync Gist for JavaScript/TypeScript Development
{"lastUpload":"2021-03-05T21:31:26.169Z","extensionVersion":"v3.4.3"}