A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
<?php | |
/* | |
* Bitstorm - A small and fast Bittorrent tracker | |
* Copyright 2008 Peter Caprioli | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
package main | |
import ( | |
"io" | |
"time" | |
"github.com/davecgh/go-spew/spew" | |
syslog "github.com/influxdata/go-syslog/v2" | |
"github.com/influxdata/go-syslog/v2/octetcounting" | |
) |
package benchmark | |
import ( | |
"context" | |
"runtime" | |
"sync" | |
"sync/atomic" | |
"testing" | |
"time" | |
) |
package main | |
import ( | |
"flag" | |
// "fmt" | |
"github.com/vys/go-humanize" | |
"io" | |
"log" | |
"net" | |
//"net/http" |
// https://medium.com/@mlowicki/http-s-proxy-in-golang-in-less-than-100-lines-of-code-6a51c2f2c38c | |
// #!/usr/bin/env bash | |
// case `uname -s` in | |
// Linux*) sslConfig=/etc/ssl/openssl.cnf;; | |
// Darwin*) sslConfig=/System/Library/OpenSSL/openssl.cnf;; | |
// esac | |
// openssl req \ | |
// -newkey rsa:2048 \ | |
// -x509 \ |
0 = Success | |
1 = Operation not permitted | |
2 = No such file or directory | |
3 = No such process | |
4 = Interrupted system call | |
5 = Input/output error | |
6 = No such device or address | |
7 = Argument list too long | |
8 = Exec format error |