Skip to content

Instantly share code, notes, and snippets.

@ggorlen
ggorlen / solid-cdn-router.html
Last active April 1, 2025 01:12
Solid.js in all CDN with router
<!DOCTYPE html>
<html lang="en">
<head>
<title>solid.js</title>
<script type="importmap">
{
"imports": {
"solid-js": "https://esm.sh/[email protected]",
"solid-js/html": "https://esm.sh/[email protected]/html",
"solid-js/web": "https://esm.sh/[email protected]/web",
@ggorlen
ggorlen / powershell-gotchas.md
Last active May 20, 2023 05:42
PowerShell gotchas
@ggorlen
ggorlen / JSON_stream_read.py
Last active December 6, 2023 05:57
JSON stream reader
# read file in the format of separate JSON objects without outer array
# {}
# {}
# {}
# ...
# https://stackoverflow.com/a/50384432/6243352
# https://stackoverflow.com/a/54666028/6243352
#
# other options:
# jq -s < podcasts.json
@ggorlen
ggorlen / codementor-get-all-sessions.js
Last active January 31, 2023 04:35
Get all Codementor sessions
const fs = require("node:fs/promises");
const url = "https://dev.codementor.io/api/sessions";
const apiKey = "";
(async () => {
const sessions = [];
for (let startingAfter = "";;) {
const response = await fetch(`${url}?starting_after=${startingAfter}`, {
@ggorlen
ggorlen / .prettierrc.json
Last active February 9, 2023 06:04
Prettier config
{
"arrowParens": "avoid",
"bracketSameLine": false,
"bracketSpacing": false,
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 65,
"proseWrap": "preserve",
@ggorlen
ggorlen / replace_in_files.py
Created October 26, 2022 01:48
Replace content in multiple files
import fnmatch
import os
import re
for directory, dirnames, filenames in os.walk("."):
for f in fnmatch.filter(filenames, "*.yml"):
path = os.path.join(directory, f)
with open(path) as file:
@ggorlen
ggorlen / py-turtle-gotchas.md
Last active January 16, 2026 01:06
Python turtle gotchas
@ggorlen
ggorlen / cw-tag-notes.md
Last active July 7, 2022 00:56
CW tag notes

Background

The kata library is difficult to browse because it's huge (9.3K+ kata!) and lacks structure. We'd like to improve the browsing experience by providing convenient ways to access interesting topics, and allowing users to drill down from broader concepts based on their interest.

The current tag system allows users to find kata based on keywords, but it's difficult to use because the list is large and unstructured. We also need to improve tagging in general.

Things to keep in mind:

  • We need to have a good balance between breadth and depth in the taxonomy for good user experience. Too many initial items like the current tags will overwhelm users. Reducing it too much and nesting too deep will be annoying to use.