With these steps I managed to get Pimox on my Raspberry Pi 4 and 5 in february 2024.
Install "RPi OS Lite 64-bit" with Raspberry Pi Imager. It's listed under "Raspberry Pi OS (Other)"
| func TestRouter(t *testing.T) { | |
| used := "" | |
| mw1 := func(next http.Handler) http.Handler { | |
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
| used += "1" | |
| next.ServeHTTP(w, r) | |
| }) | |
| } |
With these steps I managed to get Pimox on my Raspberry Pi 4 and 5 in february 2024.
Install "RPi OS Lite 64-bit" with Raspberry Pi Imager. It's listed under "Raspberry Pi OS (Other)"
If someone asked me the question "what layout should I use for my Go code repository?", I'd start by asking back "what are you building: an executable, or a library?"
Create a directory named however you want your final executable to be called (e.g. "mycommand"), change into that directory, and create the following files:
| package models | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "strings" | |
| "github.com/pkg/errors" | |
| ) |
Copy locale.md file below into same directory as your Dockerfile
FROM alpine:3.9
# Install language pack
RUN apk --no-cache add ca-certificates wget && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \| package main | |
| import ( | |
| "fmt" | |
| "github.com/jinzhu/gorm" | |
| _ "github.com/jinzhu/gorm/dialects/postgres" | |
| ) | |
| // Customer ... | |
| type Customer struct { |
| package main | |
| import ( | |
| "crypto/rand" | |
| "encoding/base64" | |
| "fmt" | |
| "io" | |
| "math/big" | |
| ) |
| package main | |
| import ( | |
| "net/http" | |
| "os" | |
| "bytes" | |
| "path" | |
| "path/filepath" | |
| "mime/multipart" | |
| "io" |
| #!/bin/zsh | |
| # Install needed tools: | |
| # brew install sox --with-libvorbis | |
| # brew install ffmpeg --with-libvpx --with-libvorbis --with-opus --with-faac | |
| set -e | |
| FILENAME=$1 | |
| echo "Converting $FILENAME to webm + ogg with normalized audio" | |
| ffmpeg -i ${FILENAME} -c:a libvorbis -vn ${FILENAME}_audio_orig.ogg | |
| ffmpeg -i ${FILENAME} -c:v libvpx-vp9 -crf 50 -b:v 0 -vf scale=840:-1 -g 50 -an ${FILENAME}_video_orig.webm |