Skip to content

Instantly share code, notes, and snippets.

@mauler
mauler / http_server_auth.py
Last active January 21, 2026 21:55 — forked from fxsjy/SimpleAuthServer.py
Python3 http.server supporting basic HTTP Auth (username/password)
# Extended python -m http.serve with --username and --password parameters for
# basic auth, based on https://gist.github.com/fxsjy/5465353
from functools import partial
from http.server import SimpleHTTPRequestHandler, test
import base64
import os
class AuthHTTPRequestHandler(SimpleHTTPRequestHandler):
@gonatan
gonatan / git-commands.sh
Last active February 17, 2022 11:58
Git commands
# fetch data from remote
git fetch # fetch
git fetch --all --prune # fetch deleted branches
# undoing stuff
git reset <file> # undo 'git add' before commit
git reset --soft HEAD~1 # undo last 'git commit' and keep changes
git reset --hard HEAD~1 # undo last 'git commit' and loose changes
git reset --merge ORIG_HEAD # undo 'git merge' before push
git checkout HEAD <file> # revert after a merge conflict corruption
@HoldenCreative
HoldenCreative / Material-design-progress-bars.markdown
Created March 13, 2015 14:06
Material design progress bars