Skip to content

Instantly share code, notes, and snippets.

View heatxsink's full-sized avatar
👽
They exist.

Nick Granado heatxsink

👽
They exist.
View GitHub Profile
@heatxsink
heatxsink / README.md
Last active July 20, 2020 03:37
Nested go.rice templates example using golang "net/http" webserver.

To run this example ...

  • mkdir templates
  • mv *.tmpl templates/
  • go get github.com/GeertJohan/go.rice
  • go generate
  • go run main.go
@heatxsink
heatxsink / smart-health-card-example.go
Last active March 9, 2024 18:16
SMART Health Card (COVID19 Vaccine) QR Code processing / decoding in golang
// Download your SMART Health Card QR code image somewhere on your filesystem.
// I'm in California, so I went here: https://myvaccinerecord.cdph.ca.gov/
//
// Some links I found useful when hacking this up ...
// - https://www.reddit.com/r/Quebec/comments/ndz2uz/how_the_covid_vaccination_qr_code_works_and_what/
// - https://github.com/dvci/health-cards-walkthrough/blob/main/SMART%20Health%20Cards.ipynb
// - https://smarthealth.cards
// - https://github.com/fproulx/shc-covid19-decoder
// - https://github.com/smart-on-fhir/health-cards/blob/main/docs/index.md#every-health-card-can-be-embedded-in-a-qr-code
// - https://github.com/smart-on-fhir/health-cards/blob/main/docs/index.md#encoding-chunks-as-qr-codes
#!/bin/bash
####
# Example usage ...
#
# sudo ./go-upgrade.sh https://go.dev/dl/go1.18.linux-amd64.tar.gz
#
###
if [ $# -eq 0 ]
then
### hostapd configuration file, loosely based on http://pisarenko.net/blog/2015/02/01/beginners-guide-to-802-dot-11ac-setup/
### for Realtek RTL8812AU via driver https://github.com/abperiasamy/rtl8812AU_8821AU_linux
### and hostap 2.5
### Operates at 135 Mbps in 802.11n/ht mode. iperf measures ~8.00 MBytes/sec 67.1 Mbits/sec
### I was not able to get 802.11ac/vht mode with additional side-channels configured with the driver.
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan2
driver=nl80211