Skip to content

Instantly share code, notes, and snippets.

View zxhoper's full-sized avatar

zxhoper zxhoper

View GitHub Profile
@zxhoper
zxhoper / ABOUT.md
Created December 19, 2022 12:45 — forked from laobubu/ABOUT.md
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@JanPetr
JanPetr / main.go
Last active December 22, 2022 05:19
Upload asset to Pex via TUS client - Golang example
package main
import (
"bytes"
"crypto/sha256"
"fmt"
"io"
"os"
"github.com/eventials/go-tus" // install with `$ go get github.com/eventials/go-tus`
@andrewmilson
andrewmilson / file-upload-multipart.go
Last active June 29, 2024 14:07
Golang multipart/form-data File Upload
package main
import (
"net/http"
"os"
"bytes"
"path"
"path/filepath"
"mime/multipart"
"io"
@ju2wheels
ju2wheels / docker-compose.yml
Created June 10, 2015 20:11
docker-compose reference YAML file with comments
# https://docs.docker.com/compose/yml/
# Each service defined in docker-compose.yml must specify exactly one of
# image or build. Other keys are optional, and are analogous to their
# docker run command-line counterparts.
#
# As with docker run, options specified in the Dockerfile (e.g., CMD,
# EXPOSE, VOLUME, ENV) are respected by default - you don't need to
# specify them again in docker-compose.yml.
#
service_name: