Skip to content

Instantly share code, notes, and snippets.

FrancisTurner /
Last active December 13, 2021 06:28
One liner to retrieve the latest released go version for raspberry pis
curl -L$(curl -s | grep '/ref' | sed -e '/beta/ d' -e '/rc/ d' -e 's/.*\(go[0-9.]*\).*/\1/' | tail -1).linux-armv6l.tar.gz | sudo tar -xzC /usr/local
# change armv6l for arm64 to get the 64 bit version for pi 4s
#set up etc.
echo 'PATH=$PATH:/usr/local/go/bin' >> ~/.profile
source ~/.profile
which go
go version
# echo 'GOPATH=/home/pi/golang' >> ~/.profile
# mkdir /home/pi/golang
FrancisTurner /
Created December 6, 2021 07:29
txt2json sed oneliner
sed -e 's/^/"/' -e 's/$/",/' -e '1 s/^/[/' -e '$ s/,$/]/' file.txt > file.json
FrancisTurner /
Created June 7, 2021 10:21
Script to autoupdate armv6 cloudflared
#!/bin/bash -e
# Copyright (c) 2021, Francis Turner
# All rights reserved.
# Script that automates checking and if required downloading and replacing of the
# latest armv6 cloudflared as built by Darren Hobin (
# for use on pi zeros and other armv6 devices