Skip to content

Instantly share code, notes, and snippets.

View tenox7's full-sized avatar

Antoni Sawicki tenox7

View GitHub Profile
@tenox7
tenox7 / htmlSelOpt.go
Last active October 15, 2021 07:13
HTML Select Option Generator in Go
// easily create html form select/option with default selection (selected) and disabled
package main
import (
"fmt"
"strings"
)
func selOpt(s string, f ...struct{ v, n string }) string {
var o []string
@tenox7
tenox7 / getsignaldeb.sh
Last active November 17, 2020 04:21
overcomplicated method of downloading .deb for signal-desktop
#!/bin/bash -xe
# overcomplicated method of downloading .deb for signal-desktop
docker rmi -f getsignal
cat <<EOF | docker build -t getsignal -f- .
FROM ubuntu
RUN apt update
RUN apt install -y wget sudo gnupg
RUN wget -O- https://updates.signal.org/desktop/apt/keys.asc | apt-key add -
RUN echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" >> /etc/apt/sources.list.d/signal-xenial.list
RUN apt update