I hereby claim:
- I am borud on github.
- I am borud (https://keybase.io/borud) on keybase.
- I have a public key ASCIDyn4US9NmGqSvSM_v0FIVc7PpwrrtcGnU8R4qiVF4wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"encoding/pem" | |
"fmt" | |
"log" | |
"os" | |
"github.com/youmark/pkcs8" | |
) |
package main | |
import ( | |
"fmt" | |
"log" | |
"time" | |
) | |
type broadcastable interface{} |
package main | |
import ( | |
"fmt" | |
"math/big" | |
"os" | |
"strconv" | |
) | |
func main() { |
// formWrapper converts a POST'ed form to the JSON object we want. grpc-gateway doesn't | |
// normally accept anything other than application/json, so we intercept anything that | |
// has Content-Type equal to "application/x-www-form-urlencoded". | |
func formWrapper(h http.Handler) http.Handler { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
// If we can't get the media type this request we just pass it on | |
mediaType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) | |
if err != nil { | |
h.ServeHTTP(w, r) | |
return |
go build -o mybinary -tags osusergo,netgo,sqlite_omit_load_extension -ldflags="-linkmode external -extldflags=-static" |
# Fix locale problems on Raspberry Pi | |
This supposedly fixes locale issues on Raspberry Pi. Be aware that | |
this is slow as fuck. | |
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
locale-gen en_US.UTF-8 | |
dpkg-reconfigure locales |