Skip to content

Instantly share code, notes, and snippets.

@cybertk
cybertk / SimpleHTTPServerWithUpload.py
Created May 16, 2017 02:29 — 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.
"""
@cybertk
cybertk / largest
Last active June 1, 2017 07:51
List directories sorted by size, find largest directories
#!/usr/bin/env bash
# List directories sorted by size, find largest directories
# Author: Quanlong <kyan.ql.he@gmail.com>
# Version: v20170601
#
# Upgrade with curl -o https://gist.githubusercontent.com/cybertk/4b02531350c09235f3e2d00fdbb3bbcd/raw/36ebae4da87ea7fe504ba58c32c81060c62e6b8d/largest
list_dir_by_size() {
declare dir="$1"