This file contains hidden or 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
| #!/bin/bash | |
| INPUT=$(cat) | |
| FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path') | |
| # Run prettier on all supported files | |
| npx -y prettier --write "$FILE_PATH" >/dev/null 2>&1 | |
| # Additionally run markdownlint on .md files | |
| if [[ "$FILE_PATH" == *.md ]]; then | |
| npx -y markdownlint-cli2 --fix "$FILE_PATH" >/dev/null 2>&1 |
This file contains hidden or 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
| // custom tab label patterns | |
| // updated 2025-12-07 | |
| "workbench.editor.labelFormat": "default", | |
| "workbench.editor.customLabels.enabled": true, | |
| "workbench.editor.customLabels.patterns": { | |
| "**/src/**/*.css": "${filename}", | |
| "**/src/**/utils/**/*.{js,ts}": "${filename} ⚙️", | |
| "**/src/**/*.d.ts": "${filename} <T>", | |
| "**/src/**/*.{js,ts}": "${filename}", | |
| /** SVELTE */ |
This file contains hidden or 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
| buildImage = 'ghcr.io/railwayapp/nixpacks:latest' | |
| [phases.setup] | |
| nixPkgs = ["nodejs_24", "pnpm_10"] | |
| # node v24.5.0 | |
| nixpkgsArchive = 'cf93ceb06388f5714302b702cccf2c77f6064442' | |
| [phases.install] | |
| dependsOn = ["setup"] | |
| cmd = "pnpm install --frozen-lockfile" |
This file contains hidden or 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
| # add definition to ~/.bashrc / ~/.zshrc | |
| # invoke with download <url> | |
| download() { | |
| url="${1:-}" | |
| # Loop until the download is successful | |
| while true; do | |
| # Use curl with the -C - option to resume the download | |
| curl -C - -O "$url" | |
This file contains hidden or 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
| # source https://jwstanly.com/blog/article/Port+Forwarding+WSL+2+to+Your+LAN/ | |
| $ports = @(80, 443, 4321, 5173); | |
| $wslAddress = bash.exe -c "ifconfig eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'" | |
| if ($wslAddress -match '^(\d{1,3}\.){3}\d{1,3}$') { | |
| Write-Host "WSL IP address: $wslAddress" -ForegroundColor Green | |
| Write-Host "Ports: $ports" -ForegroundColor Green | |
| } | |
| else { |
This file contains hidden or 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
| <script> | |
| /** my REPL link: | |
| * https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACr1Z624buRV-lbNKYckLSaOLx2vLsra2YzdpN22xTtEfqwChZiiJMDWcJTl2FEFA3qAo0D_91X99sDxBH6GHnLsuGwuyLUiaGfJc-H08h-SQi8qYcaoqvV8WlYDMaKVXuQjDSr2i56F5UPeUa4rPSkTSMyV95UkW6sEwGGrneyA-CTX1YSzFDKZah6rnOBOmp9Go6YmZE9ERlb5QTDka1UjoaEmpMyMscHw6E8pR0nOuP5FZiO1wXtMxibh2bq1f-N4ZBgBsFgqpYQFXggsJy9hZ9feJQfpJ00AxETQ8U18tqPzElH6r6WyrBkeBBkOJotZ7rL_Vc063qmm8bSgjUtS71URqKv_EdKw4rKSaKq5p3DE9rJyVMF37TOegchVPSLoqK4J3Igp0Lhx3jxUzgpxqoJzOKMqcw-_Qq6a1w7OsKnZVqjF1idla7RDOB7AwRZALB_QhaWQtqYLUSS-9qWcVKUWqB7-khRB3HMZDMGaTSNLaAkx8GZmM66YJv3rWY_bxAywP67mVXHaTpd_SzHsmK_yQ3aExbcF8zBXMpz_tDMolAG8Y6CmVtL4i6qzJ9sM1ZT1lCvBLoE9ngxFRzOs7eIes2fAHMYa-0lIEk8F7GwV9J3lswi2ircfOgZgf53DHAt8oWVNgghJsUCqYi-jrl3_7EEoxIiM-Rxch9ZK4JLFo3MNNuIw0PBAMWowBxo0qKEqNKzDpoXqrWFeR9SO-hrXP2VoZ9uCUaGyXoWAUcROTxgM84HiBUUjh65f_rhlyNljabB21AUNWP4jYrMlr1XyEwb6zhmBD971VAbZdIzFEw0RSon-EC-wA0xPYCbYYe9fQipTTnNik2yzwGaZ1E36iMQ1azpEKT_gURlx4d9-mOpR00LcKHidKnQ8rnASTiExow1NqWBmMhD-Pc9hnKuRk3oMAqcVUX_YdozhAq2j |
This file contains hidden or 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
| sudo apt-get remove \ | |
| aisleriot \ | |
| brltty \ | |
| duplicity \ | |
| empathy \ | |
| empathy-common \ | |
| example-content \ | |
| gnome-accessibility-themes \ | |
| gnome-contacts \ | |
| gnome-mahjongg \ |
This file contains hidden or 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
| (function(f,h){typeof exports=="object"&&typeof module<"u"?module.exports=h():typeof define=="function"&&define.amd?define(h):(f=typeof globalThis<"u"?globalThis:f||self,f.Counter=h())})(this,function(){"use strict";function f(){}function h(t){return t()}function T(){return Object.create(null)}function p(t){t.forEach(h)}function N(t){return typeof t=="function"}function O(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function Q(t){return Object.keys(t).length===0}function a(t,e){t.appendChild(e)}function P(t,e,n){t.insertBefore(e,n||null)}function V(t){t.parentNode.removeChild(t)}function m(t){return document.createElement(t)}function k(t){return document.createTextNode(t)}function S(){return k(" ")}function L(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function b(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function R(t){return Array.from(t.childNodes)}function U(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function B(t,e, |
This file contains hidden or 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
| function copyToClipboard(domRef) { | |
| // get DOM Element which contains the output | |
| // i.e. ".cell-output code" to the first output chunk | |
| const dom = document.querySelector(domRef); | |
| // get the clean inner string of the DOM Element (no HTML) | |
| const innerText = dom.innerText; | |
| // with RegEx, remove [nr] and " | |
| const cleanString = innerText.replace(/\[\d+]\s/, '').replace(/"/g, "") | |
| // write to clipboard | |
| navigator.clipboard.writeText(cleanString); |
This file contains hidden or 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
| create type public.continents as enum ( | |
| 'Africa', | |
| 'Antarctica', | |
| 'Asia', | |
| 'Europe', | |
| 'Oceania', | |
| 'North America', | |
| 'South America' | |
| ); | |
| create table public.countries ( |
NewerOlder