If you're OK in having a node-esm
executable, please consider this solution.
#!/usr/bin/env sh
# the /usr/local/bin/node-esm executable
input_file=$1
shift
exec node --input-type=module - $@ <$input_file
If you're OK in having a node-esm
executable, please consider this solution.
#!/usr/bin/env sh
# the /usr/local/bin/node-esm executable
input_file=$1
shift
exec node --input-type=module - $@ <$input_file
<template> | |
<div id="demo"> | |
<h1>Latest Vue.js Commits</h1> | |
<template v-for="branch in branches"> | |
<input type="radio" | |
:id="branch" | |
:value="branch" | |
name="branch" | |
v-model="currentBranch"> | |
<label :for="branch">{{ branch }}</label> |
# WSL2 network port forwarding script v1 | |
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell, | |
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter. | |
# written by Daehyuk Ahn, Aug-1-2020 | |
# Display all portproxy information | |
If ($Args[0] -eq "list") { | |
netsh interface portproxy show v4tov4; | |
exit; | |
} |
// Here's how I use this shortcode in my .md files: | |
// | |
// {% picture | |
// "/2020/06/platform-adjacency-theory/relevance_gap_opt.png", | |
// "Mind the gap." | |
// %} | |
// | |
// And for the <figure> version that puts the alt text visibly below the image: | |
// | |
// {% figure |
"C:\Program Files (x86)\GnuPG\bin\gpg-connect-agent.exe" /bye
This will only load the agent at Startup, and you won't be bothered by any UI or tray agent.%userprofile%/.ssh
directory (Windows dir is important for performance).# Useful script for detaching the screen of Surface Book. | |
# Run if detach light blinks red indicating that it cannot be detached | |
# since applications are preventing the detach. | |
# | |
# Option 1: Copy-paste into powershell window. | |
# | |
# Option 2: Run as PowerShell script (requires execution policy change): | |
# https://superuser.com/questions/106360/how-to-enable-execution-of-powershell-scripts | |
# | |
Try { |
import { decode } from "blurhash" | |
export function blurHashToDataURL(hash: string | undefined): string | undefined { | |
if (!hash) return undefined | |
const pixels = decode(hash, 32, 32) | |
const dataURL = parsePixels(pixels, 32, 32) | |
return dataURL | |
} |
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |