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
@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;
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));

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>
@jdanyow
jdanyow / index.html
Created May 3, 2022 19:00
Star rating web component - slot refactor
<!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>
@jdanyow
jdanyow / index.html
Last active April 26, 2022 03:19
Star rating web component
<!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>
<!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>
@jdanyow
jdanyow / index.html
Last active February 18, 2022 22:01
Atlas
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark">
<title>Microsoft Atlas</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@microsoft/atlas-css/dist/index.css">
</head>
<body class="markdown padding-sm padding-xl-tablet padding-xxl-desktop">
@jdanyow
jdanyow / command.md
Created February 8, 2022 03:11
--disable-web-security macos
open -na Brave\ Browser --args --user-data-dir=/tmp/temporary-chrome-profile-dir --disable-web-security --disable-site-isolation-trials