Skip to content

Instantly share code, notes, and snippets.

View ssatocc's full-sized avatar
🏠
Working from home

ssatocc

🏠
Working from home
View GitHub Profile
import time
from typing import Callable, Dict, TypeVar
T = TypeVar("T")
def memoize(f: Callable[[T], T]) -> Callable[[T], T]:
cache: Dict[T, T] = {}
def _wrapper(n: T) -> T:
@ssatocc
ssatocc / run.sh
Created January 30, 2024 06:06
Output a csv of repositories with GitHub CLI
#!/bin/bash
username=ssatocc
gh repo list $username --json name,isPrivate --limit 50 | jq -r 'sort_by(.name) | .[] | [.name, .isPrivate] | @csv' > repos.csv
sed -i 's/"//g' repos.csv
#!/bin/bash
exec sleep infinity