Skip to content

Instantly share code, notes, and snippets.

View mazharul's full-sized avatar

Mazharul Anwar mazharul

View GitHub Profile
@mazharul
mazharul / web-servers.md
Created May 13, 2021 11:21 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mazharul
mazharul / clean_code.md
Created January 25, 2021 04:27 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

import sys
import csv
import httplib, urllib, base64
def main():
# set the name of your repository, username and password
username = "test"
password = "test"
repo = "test"