Skip to content

Instantly share code, notes, and snippets.

@kebyn
kebyn / SimpleHTTPServerWithUpload.py
Last active December 19, 2023 08:07 — forked from touilleMan/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
__version__ = "0.7"
__all__ = ["SimpleHTTPRequestHandler"]
import argparse
import http.server
from html import escape
from io import BytesIO
from mimetypes import add_type, guess_type, init, inited
@kebyn
kebyn / docker-save-load-images.sh
Last active September 19, 2019 02:31 — forked from mathewdgardner/docker-save-load-images.sh
Save / load compressed docker images
#!/bin/bash
# Save docker images
ds() {
docker images --format {{.Repository}}:{{.Tag}} | xargs -t -n 1 -I {} -P 4 sh -c 'docker save {} > $(echo "{}" | sed "s/^.*\///").tar.gz'
}
# Load docker images
dl() {
ls *.tar.gz | xargs -t -n 1 -I {} -P 4 sh -c 'docker load -i {}'
@kebyn
kebyn / get_image_manifest.sh
Created April 24, 2018 12:50 — forked from alex-bender/get_image_manifest.sh
Docker Registry v2 get manifest and push\pull
#!/bin/bash
#
# Shell scripts for get image manifest from v2 registry
#
# Tested on Debian 8, curl 7.38.0, jq-1.5
#
set -e -u
# Default tag is latest
@kebyn
kebyn / get_image_manifest.sh
Created April 24, 2018 12:50 — forked from alex-bender/get_image_manifest.sh
Docker Registry v2 get manifest and push\pull
#!/bin/bash
#
# Shell scripts for get image manifest from v2 registry
#
# Tested on Debian 8, curl 7.38.0, jq-1.5
#
set -e -u
# Default tag is latest