This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do | |
echo -e "HTTP/1.1 200 OK\n\n $(date)" | nc -l -p 1500 -q 1 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
import logging | |
class S(BaseHTTPRequestHandler): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is intended as a starting point for a customized makefile for a Go project. | |
# | |
# Targets: | |
# all: Format, check, build, and test the code | |
# setup: Install build/test toolchain dependencies (e.g. gox) | |
# lint: Run linters against source code | |
# format: Format the source files | |
# build: Build the command(s) for target OS/arch combinations | |
# install: Install the command(s) | |
# clean: Clean the build/test artifacts |