Skip to content

Instantly share code, notes, and snippets.

View jimkil's full-sized avatar

Jimmy Kilgore jimkil

View GitHub Profile
@jimkil
jimkil / Git push deployment in 7 easy steps.md
Created March 4, 2022 13:04 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@jimkil
jimkil / clone.bash
Last active March 4, 2022 12:33 — forked from milanboers/clone.bash
[clone-repos-user] Clone all repositories of a Github user #snippet #bash #github #git
# Clone all repositories of a Github user
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone