Skip to content

Instantly share code, notes, and snippets.

View kevindurb's full-sized avatar

Kevin Durbin kevindurb

View GitHub Profile
@kevindurb
kevindurb / HashRouter.js
Last active February 25, 2026 15:06
A basic lit js modern hash router thats so simple you dont need a library for it
export class HashRouter {
#baseURL;
#host;
#routes;
constructor(host, routes) {
this.#baseURL = `${location.protocol}//${location.host}`;
this.#host = host;
this.#routes = routes.map(([p, render]) => [
new URLPattern(p, this.#baseURL),
@kevindurb
kevindurb / zshrc
Created May 29, 2014 15:58
git aliases
# git aliases to make stuff faster
alias gits="tig status"
alias gitc="git commit -a"
alias gita="git amend"
alias gitcp="git cherry-pick"
alias gitp="git push origin"
alias gitd="git diff -w"
alias gitpu="git smart-pull"
alias gitl="tig"
alias gitch="git checkout"