Skip to content

Instantly share code, notes, and snippets.

View hisco's full-sized avatar

hisco

View GitHub Profile
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# rollback‑ghpages.sh — safely **revert** or **delete** a single commit on the
# `gh‑pages` branch, *always* creating (and verifying) a remote safety branch
# first.
# -----------------------------------------------------------------------------
# Usage
# ./rollback-ghpages.sh [options] <commit-sha>
#
# Options
@hisco
hisco / delete-old-tags.sh
Created July 17, 2025 12:03
This script helps you keep repositories tidy by finding and optionally deleting tags older than a chosen number of months (default = 3). It works on both local and remote copies of each tag and stores a plain-text backup so nothing is lost.
#!/bin/bash
# === Configuration ===
MONTHS=${1:-3} # Number of months (default: 3)
DRY_RUN=${DRY_RUN:-false} # Set to true for dry run mode
NOW=$(date +%s) # Current time in epoch seconds
BACKUP_FILE=deleted_tags_backup.txt
# Check if we're in a git repository
if ! git rev-parse --git-dir > /dev/null 2>&1; then
@hisco
hisco / package.json
Last active July 23, 2019 04:35
Stubz express example - WIP
{
"name": "hello-stubz",
"version": "0.0.1",
"description": "A simple example of subz server.",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"@stubz/core":"0.0.14",