Skip to content

Instantly share code, notes, and snippets.

View mguidoti's full-sized avatar

Marcus Guidoti mguidoti

  • Porto Alegre, RS, Brazil
View GitHub Profile
@mguidoti
mguidoti / git-tag-delete-local-and-remote.sh
Created July 23, 2021 19:35 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@mguidoti
mguidoti / progress_bar_requests_upload.py
Created July 19, 2021 19:04 — forked from tyhoff/progress_bar_requests_upload.py
Python requests HTTP PUT with tqdm progress bar
from tqdm import tqdm
from tqdm.utils import CallbackIOWrapper
file_path = os.path.abspath(__file__)
upload_url = https://some-bucket.s3.amazonaws.com
file_size = os.stat(file_path).st_size
with open(file_path, "rb") as f:
with tqdm(total=file_size, unit="B", unit_scale=True, unit_divisor=1024) as t:
wrapped_file = CallbackIOWrapper(t.update, f, "read")