Skip to content

Instantly share code, notes, and snippets.

View zxhoper's full-sized avatar

zxhoper zxhoper

View GitHub Profile
@zxhoper
zxhoper / main.go
Created December 22, 2022 05:19 — forked from JanPetr/main.go
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`
@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
@zxhoper
zxhoper / file-upload-multipart.go
Created December 16, 2022 12:36 — forked from andrewmilson/file-upload-multipart.go
Golang multipart/form-data File Upload
package main
import (
"net/http"
"os"
"bytes"
"path"
"path/filepath"
"mime/multipart"
"io"
@zxhoper
zxhoper / docker-compose.yml
Created August 24, 2022 15:41 — forked from ju2wheels/docker-compose.yml
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: