- Install GPG4Win.
- Start up Kleopatra (a UI tool from 1) and make sure your YubiKey is loaded there.
- You can also add GPG4Win to Startup folder using a link with this Target:
This will only load the agent at Startup, and you won't be bothered by any UI or tray agent."C:\Program Files (x86)\GnuPG\bin\gpg-connect-agent.exe" /bye
- You can also add GPG4Win to Startup folder using a link with this Target:
- Download wsl2-ssh-pageant into your Windows
%userprofile%/.ssh
directory (Windows dir is important for performance).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; // ¯\\_(ツ)_/¯ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function listenRepeatedly(entity: string, server: Server, port: number) { | |
for (let i=0; i<10; i++) { | |
const currentPort = port + i; | |
try { | |
await listenOnce(server, currentPort); | |
console.log(`${entity}: listening at port ${currentPort}.`); | |
return; | |
} catch (err) { | |
if (err.code === 'EADDRINUSE') { | |
console.log(`${entity}: port ${currentPort} in use, trying next port...`); |
just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo
.
NewerOlder