Skip to content

Instantly share code, notes, and snippets.

View stuhli's full-sized avatar

Mathias Stuhlmacher stuhli

View GitHub Profile
@stuhli
stuhli / gist:d9b3c2e3e2041a95e9e7f89d6fe8c7cc
Created August 17, 2020 11:56
Django - Reset primary key ID (SQL sequence combined with PostgreSQL database)
(venv) $ python manage.py sqlsequencereset <APP_ANME> | python manage.py dbshell

Keybase proof

I hereby claim:

  • I am stuhli on github.
  • I am stuhli (https://keybase.io/stuhli) on keybase.
  • I have a public key whose fingerprint is 2491 1365 0B81 F88E 692E EB07 E803 D2AA A9E9 191B

To claim this, I am signing this object:

@stuhli
stuhli / SimpleHTTPServerWithUpload.py
Created August 27, 2019 08:22 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""