Skip to content

Instantly share code, notes, and snippets.

View fpiorl's full-sized avatar
🏑

Francesco Pio Orlando fpiorl

🏑
View GitHub Profile
@fpiorl
fpiorl / githell.sh
Created January 20, 2026 10:19
stupid git repo manager in 30 lines of bash
#!/bin/bash
max_workers=16
running=0
semaphore(){ # acquire
((running++))
if (( running >= max_workers )); then
wait -n # release
((running--))
fi
@fpiorl
fpiorl / ghligh-cat-jq.sh
Created January 13, 2026 14:25
ghligh annot as json array
#!/bin/bash
set -e
ghligh ls -R \
| xargs ghligh cat --json \
| jq '.[]'
@fpiorl
fpiorl / gh-bulk-private
Created January 13, 2026 13:50
github bulk make repository private using a regex and my other gist "gh-grep"
regex=$*
./gh-grep "$*" | xargs -n 1 gh repo edit --visibility private --accept-visibility-change-consequences
@fpiorl
fpiorl / gh-grep.sh
Created January 13, 2026 13:44
grep your github cli repositories
#!/usr/bin/env bash
regex=$*
set -Eeuo pipefail
gh repo list --limit 1000 --json nameWithOwner \
| jq -r '.[] | .nameWithOwner' \
| awk -F/ '{print $2 "|" $0}' \
| grep "${regex}" \
| cut -d'|' -f2
@fpiorl
fpiorl / ffsplit.sh
Created June 21, 2025 22:16
ffmpeg split a video into n parts
#!/bin/bash
if [ "$#" -ne 2 ] ; then
echo "usage: $0 <videoname> <number_of_parts>"
exit 1
fi
videoname=$1
number=$2
videoname_noext="${videoname%.*}"
@fpiorl
fpiorl / update_dns.sh
Created May 13, 2025 07:20
Simple script to update A and AAAA records on gandi from my homeserver
#!/bin/bash
# Simple script to update A and AAAA records on gandi.net from my homeserver
##################### config ###################
api_key=
domain=
#####################********###################
set -e