Skip to content

Instantly share code, notes, and snippets.

@closetgeekshow
closetgeekshow / Canongraph-mmd.md
Last active June 21, 2025 21:33
Canongraph-mmd.md
%%{ init: { "theme": "default" } }%%

graph TD

%% === Roles (RBAC) ===
role_editor["🧑‍💼 editor"]:::rbac
role_moderator["🧑‍💼 moderator"]:::rbac

%% === Entities (RBAC) ===
@closetgeekshow
closetgeekshow / spider-mark.py
Last active November 20, 2024 04:45
python script to spider an URL and convert its contents to md and put in a directory
import os
import requests
from bs4 import BeautifulSoup
from markdownify import markdownify
from urllib.parse import urljoin, urlparse
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
from tqdm import tqdm
import hashlib
from ratelimit import limits, sleep_and_retry
@closetgeekshow
closetgeekshow / highlightsAndCopySelects.bookmarklet.js
Last active October 26, 2024 00:56
highlight all selects, onClick: copy options to clipboard, clear everything after
javascript:void%20function(){(()=%3E{function%20a(a){a.preventDefault();const%20e=Array.from(a.target.getElementsByTagName(%22option%22)).map(a=%3Ea.innerText),f=e.join(%22\n%22);navigator.clipboard.writeText(f),b.forEach((a,b)=%3E{a.style.backgroundColor=c[b]}),d.abort()}const%20b=Array.from(document.getElementsByTagName(%22select%22)),c=b.map(a=%3EgetComputedStyle(a).backgroundColor),d=new%20AbortController;b.forEach(a=%3Ea.style.backgroundColor=%22yellow%22),b.forEach((b,c)=%3E{b.addEventListener(%22mousedown%22,b=%3Ea(b,c),{capture:!0,signal:d.signal})})})()}();
@closetgeekshow
closetgeekshow / highlight-tables-click-to-tsv.bookmarklet.js
Last active September 27, 2024 21:36
Bookmarklet: Highlight Tables, Click to copy as TSV
/* I made this with assistance from Sourceforge Cody (https://sourcegraph.com/cody/chat) to help me copy the search results in Axure Cloud to an Excel file but it should be generic enough to work everywhere. I would recommend putting this script through an IIFE generator like Bookmarklet Maker (https://caiorss.github.io/bookmarklet-maker/) before putting it in a bookmark.
**SUMMARY**
1. Creates and appends the necessary style for highlighting tables.
2. Highlights all tables with semi-transparent red overlays.
3. When a table is clicked:
* Copies the table contents to the clipboard in TSV format.
* Immediately cleans up by removing all added elements and styles.
*/
@closetgeekshow
closetgeekshow / _document.js
Created October 20, 2023 15:38
_document.js file for nextjs with snipcart v3.4 installed
import Document, { Html, Head, Main, NextScript } from "next/document";
import envVariables from '../envVariables'
const apiKey = envVariables.apiKey;
const snipcartFunction = `
(function() {
var c, d;
(d = (c = window.SnipcartSettings).version) != null || (c.version = '3.0');
var s, S;
(S = (s = window.SnipcartSettings).timeoutDuration) != null || (s.timeoutDuration = 2750);
@closetgeekshow
closetgeekshow / GitPod-openssl-legacy-provider-fix.md
Last active October 18, 2023 21:51
Node Error: error:0308010C:digital envelope routines fix

When you try to run a project in node and you get an error like:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)

Fix it with this fix I found from NikaidouSkin42

>Or you can run this command,then run "npm run build"。 it still works on Node.js 16 :

@closetgeekshow
closetgeekshow / README.md
Last active October 17, 2023 19:52 — forked from mrkpatchaa/README.md
Bulk delete github repos (2023 Powershell Remix)

Use this trick to bulk delete your old repos or old forks (2023 Powershell Version)

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5 and https://gist.github.com/mrkpatchaa/63720cbf744a2bf59a3e9cfe73fc33b0) and a little help from ChatGPT.

with additional notes from me

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

>Note: in Chrome, you can group them all to make it a little easier

<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;