Skip to content

Instantly share code, notes, and snippets.

View p10's full-sized avatar
🥴

Piotr Wasilewski p10

🥴
View GitHub Profile
@p10
p10 / HashRouter.md
Created May 7, 2026 18:10 — forked from machellerogden/HashRouter.md
HashRouter.svelte - Svelte 5 Optimized Hash Router

Svelte 5 Hash Router

A lightweight, production-ready hash-based router for Svelte 5, built on SvelteURL. It supports:

  • Route guards (sync or async)
  • Param extraction with optional async resolvers
  • Reactive location and state exports
  • Minimal, idiomatic integration with Svelte's reactivity model

Inspired by the principle of reactive first, framework last—this router leans on standards and composition, not magic.

import { join } from "path";
import { homedir } from "os";
import { lstat, readdir } from "fs/promises";
const PROJECTS_PATH = join(homedir(), "dev");
export interface Project {
parent: string[];
name: string;
path: string;
local M = {}
local function pick_project(title, fn)
local command = { 'pls', '--json' }
vim.fn.jobstart(command, {
stdout_buffered = true,
on_stdout = function(_, data)
if not data then
return
end
function M.fuzzy_oil()
local find_command = {
'fd',
'--type',
'd',
'--color',
'never',
}
vim.fn.jobstart(find_command, {
@p10
p10 / github-mark-all-as-read.user.js
Last active October 28, 2021 13:16
tampermonkey github PR mark all as read
// ==UserScript==
// @name Github PR - mark all as read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Mark all files as read button
// @author p10
// @match https://github.com/**/pull/**
// @icon https://www.google.com/s2/favicons?domain=github.com
// @grant none
// ==/UserScript==