Skip to content

Instantly share code, notes, and snippets.

View xf0e's full-sized avatar
💭
writing comments for compiler...

xf0e

💭
writing comments for compiler...
View GitHub Profile
@xf0e
xf0e / makefile
Created July 21, 2019 16:58 — forked from aprice/makefile
Full base Golang makefile for developers and Jenkins. Handles installing tools, formatting, linting, cross-compilation, installation, and packaging for distribution.
# 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
@xf0e
xf0e / small_server_forked.py
Created March 30, 2019 14:31
hpps server that logs GET and POST
#!/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):
@xf0e
xf0e / gist:3e6aea5f58b71fe41c60c5c475d7ef27
Created March 28, 2019 21:57
server for poor peeople
while true; do
echo -e "HTTP/1.1 200 OK\n\n $(date)" | nc -l -p 1500 -q 1
done