Skip to content

Instantly share code, notes, and snippets.

View matriphe's full-sized avatar

Muhammad Zamroni matriphe

View GitHub Profile
@matriphe
matriphe / git-config-alias.md
Last active May 16, 2022 10:37
Git Hide / Unhide

Based on https://stackoverflow.com/a/25387310

git config --global alias.hide 'update-index --assume-unchanged'
git config --global alias.unhide 'update-index --no-assume-unchanged'
git config --global alias.hidden '! git ls-files -v | grep '^h' | cut -c3-'

Usage

@matriphe
matriphe / aws-s3-glacier-restore.sh
Created May 5, 2024 10:08
Restore AWS S3 Object from Glacier Type
#!/bin/sh
# Original: https://stackoverflow.com/a/55499152
BUCKET=bucket # Replace with your actual bucket name
BPATH=path # Replace with the path within the bucket
DAYS=5 # Number of days to keep in the Standard type
S3BUCKET="s3://$BUCKET$BPATH"