Skip to content

Instantly share code, notes, and snippets.

View fubits1's full-sized avatar
🦄
Unicorning

Ilja fubits1

🦄
Unicorning
View GitHub Profile
@fubits1
fubits1 / knip.json
Created March 31, 2026 12:24
SvelteKit Knip 6 config
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"entry": ["src/lib/server/**/*.remote.js"],
"ignore": ["docs/**"],
"ignoreDependencies": ["@vitest/browser", "latex.css"],
"ignoreBinaries": ["nixpacks", "tsc"],
"ignoreIssues": {
"src/tests/landing-links.test.ts": ["unlisted"]
}
}
name asshole
description When reporting test/build results, NEVER dismiss failures as "not my problem". Always ask the user if they want you to fix them.
user-invocable true

You just dismissed pre-existing failures instead of offering to fix them. That's unhelpful.

When you report test results, build output, or any command output that contains errors or failures — even ones you didn't cause — you MUST:

@fubits1
fubits1 / .oxlintrc.json
Created March 10, 2026 12:11
Oxlint + Svelte via Eslint (as of 2026-03)
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "unicorn"],
"categories": {
"correctness": "error"
},
"ignorePatterns": ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
"rules": {
"no-case-declarations": "error",
"no-empty": "error",
#!/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
@fubits1
fubits1 / settings-customLabels.json
Last active January 30, 2026 12:35
VSCode (and Cursor) label pattern & nesting rules for Svelte and Astro
// 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 */
@fubits1
fubits1 / nixpacks.toml
Created August 16, 2025 08:50
nixpacks with nodejs_24 (Node v24.5.0)
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"
@fubits1
fubits1 / resumable-download.sh
Created October 21, 2024 14:49
Bash: resumable download function with curl
# 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"
@fubits1
fubits1 / WSL2-Forward-Ports.ps1
Created August 13, 2024 22:56
WSL2: forward ports (e.g. localhost:4321 / 0.0.0.0:5173)
# 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 {
@fubits1
fubits1 / TipTapEditorRunes.svelte
Last active July 17, 2024 10:11
Svelte 5 and tiptap editor default example (REPL backup just in case)
<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
@fubits1
fubits1 / ubuntu-bloat-removal.sh
Created March 22, 2024 16:04 — forked from NickSeagull/ubuntu-bloat-removal.sh
Updated Jan 22nd, 2024 - Simple command to remove all "bloatware" from ubuntu
sudo apt-get remove \
aisleriot \
brltty \
duplicity \
empathy \
empathy-common \
example-content \
gnome-accessibility-themes \
gnome-contacts \
gnome-mahjongg \