Skip to content

Instantly share code, notes, and snippets.

Avatar

Maurizio Pillitu maoo

View GitHub Profile
@Integralist
Integralist / GitHub curl.sh
Last active Apr 13, 2022 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
View GitHub curl.sh
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@glennblock
glennblock / fork forced sync
Created Mar 4, 2012
Force your forked repo to be the same as upstream.
View fork forced sync
git fetch upstream
git reset --hard upstream/master