Skip to content

Instantly share code, notes, and snippets.

View jdanyow's full-sized avatar
💭
Confirming my whereabouts

Jeremy Danyow jdanyow

💭
Confirming my whereabouts
View GitHub Profile
const { base64url } = await import('https://cdn.skypack.dev/rfc4648');
/**
* @param {JsonWebKey} key
*/
async function generateThumbprint(key) {
// https://datatracker.ietf.org/doc/html/rfc7638
const { e, kty, n } = key;
const json = JSON.stringify({ e, kty, n });
const encoder = new TextEncoder();
const digest = await crypto.subtle.digest('SHA-256', encoder.encode(json));
@jdanyow
jdanyow / README.md
Created October 11, 2018 02:10
Instructions for creating a bookmarklet to display JSLL data-bi-name tags.

JSLL Content Tag Viewer

This document contains the steps for creating a bookmark enabling you to view any page’s JSLL “data-bi-name" tags. The instructions are chrome specific, similar steps will work in other browsers.

  1. In Chrome, press CTRL+SHIFT+B to display the bookmark bar.

  2. Right click on the bookmark bar and choose Add page....

  3. In the Edit bookmark dialog, clear the contents of the Name field and enter something like Show JSLL Content Tags.

@jdanyow
jdanyow / app.html
Last active January 29, 2024 16:16
Aurelia Gist
<template>
<h1>${message}</h1>
</template>
@jdanyow
jdanyow / README.md
Created November 16, 2023 04:56
Optimize PNGs using GitHub actions

A GitHub action to optimize PNG files that were created/modified in a pull request.

@jdanyow
jdanyow / index.html
Last active November 11, 2023 04:43
Resize SVG viewbox
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Path fitter</title>
<style>
form {
display: flex;
flex-direction: column;
gap: 8px;
@jdanyow
jdanyow / app.html
Created April 6, 2016 11:26
Aurelia "let" element
<template>
<require from="let"></require>
<let foo.bind="bar"></let>
<div if.bind="foo">Test</div>
${message}
</template>
@jdanyow
jdanyow / app.html
Last active July 3, 2023 13:02
Aurelia Validation Demo
<template>
<require from="./registration-form"></require>
<registration-form></registration-form>
</template>

docs-ui developer workflows

npm run develop

  1. Developer's browser
  2. Static file hosting using browser-sync, middleware using docfx publish.json files
  3. File system (docfx v3 build output)
flowchart LR

package.json

{
  "name": "xxxxxxx",
  "version": "1.0.0",
  "description": "Parcel reporter to emit bundle manifest",
  "main": "index.js",
  "repository": "xxxxxxx",
  "author": "xxxxxxx",
  "homepage": "xxxxxxx",
@jdanyow
jdanyow / index.html
Last active May 4, 2022 20:08
Star rating web component - slot refactor 5/3 - variation 2
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@microsoft/atlas-css/dist/index.css">
<!-- fake design system styles or application styles to illustrate styling the "public interface" of the web component (the component itself as well as "parts" it's exposed for styling) -->
<style>