Skip to content

Instantly share code, notes, and snippets.

View dragermrb's full-sized avatar

Manuel Rodríguez dragermrb

  • Whiteguru SL
View GitHub Profile
@dragermrb
dragermrb / Description-and-Usage.md
Created May 17, 2020 12:43
HTML5 Resize image before upload without ajax

HTML5 Resize image before upload without ajax

Allows to resize a file input image before upload to the server. The resized image will be attached to original file input. Then you can submit your form without ajax or handle it as you need.

Usage as jQuery Plugin

<form>
    <label>Select image</label>
@dragermrb
dragermrb / server.py
Last active December 28, 2023 06:10
Python 3 HTTP Server with Basic Authentication
import http.server
import cgi
import base64
import json
from urllib.parse import urlparse, parse_qs
class CustomServerHandler(http.server.BaseHTTPRequestHandler):
def do_HEAD(self):