Skip to content

Instantly share code, notes, and snippets.

View darcien's full-sized avatar
🚴

Yosua Ian Sebastian darcien

🚴
View GitHub Profile
@darcien
darcien / visualizePr.ts
Last active May 31, 2023 16:39
script to visualize recent pr line diff counts for internal jokes
#!/usr/bin/env -S deno run
import { sortBy } from "https://deno.land/[email protected]/collections/sort_by.ts";
import { groupBy } from "https://deno.land/[email protected]/collections/group_by.ts";
import { reduceGroups } from "https://deno.land/[email protected]/collections/reduce_groups.ts";
import { plot } from "https://deno.land/x/[email protected]/mod.ts";
// Using JSON from this gh --json output
// gh pr list --json title,additions,deletions,changedFiles,author,number --search "uiv2 in:title" --state=all --limit 300
type Pr = {
@darcien
darcien / justfile
Created June 25, 2023 15:09
justfile for restic backup, put this in home dir
set dotenv-load
export RESTIC_REPOSITORY := 'E:\restic-repo'
# This retrieve the pw from bitwarden vault.
# bw cli needs bw login and bw session key set in .env before used.
export RESTIC_PASSWORD := `bw get password "restic repo"`
# Restic docs
# https://restic.readthedocs.io/en/stable/index.html
@darcien
darcien / index.css
Created March 28, 2024 17:32
Indeterminate progress indicator a la Windows XP boot
.bar {
background-color: white;
width: 200px;
padding: 4px;
border-radius: 4px;
border: 2px solid;
overflow: hidden;
height: 20px;
}