Skip to content

Instantly share code, notes, and snippets.

@clly
clly / tshello.go
Created August 14, 2023 02:22
tshello
// The tshello server demonstrates how to use Tailscale as a library.
package main
import (
"flag"
"fmt"
"html"
"log"
"net/http"
"strings"
@clly
clly / Actual Caddyfile
Created August 4, 2023 01:53
Dockerfile, Caddyfile, and github action
{
auto_https off
}
:443 {
bind tailscale+tls/app
handle / {
reverse_proxy / http://192.168.1.1:29552
}
@clly
clly / keybase.md
Created October 31, 2022 02:19 — forked from webframp/keybase.md
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@clly
clly / ca.md
Created September 16, 2022 15:57 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@clly
clly / gist:9e014d10e6786047a861c76a572fbd56
Created March 14, 2022 17:20
Managing and retrieving credentials using git-credential-manager
# Retrieving credentials
(echo protocol=https; echo url=https://clly@github.com; echo host=github.com) | git-credential-manager-core get
# OR
(echo url=https://clly@github.com) | git credential fill
## To replace credentials use the INPUT/OUTPUT format in git-credentials[1]: https://git-scm.com/docs/git-credential#IOFMT
cat <<EOF | git-credential-manager-core store
protocol=https
RUN apt-get update && apt-get install -y \
packages\
&& rm -rf /var/lib/apt/lists/*
@clly
clly / simple-gpg-enc.go
Created March 2, 2018 17:51 — forked from stuart-warren/simple-gpg-enc.go
golang gpg/openpgp encryption/decryption example
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"io/ioutil"
"log"
"os"
)

Keybase proof

I hereby claim:

  • I am clly on github.
  • I am clly (https://keybase.io/clly) on keybase.
  • I have a public key ASAv_trC4I4jpLEyFHuwFXf7VlNUXlmPEzotlZRPpCHNhgo

To claim this, I am signing this object:

sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
sc config DiagTrack start= disabled
sc config diagnosticshub.standardcollector.service start= disabled
sc config dmwappushservice start= disabled
REM sc config RemoteRegistry start= disabled
@clly
clly / gist:7dac181f85c12fbd9b7d
Created January 24, 2015 00:25
Cassandra healthcheck
// Author: Connor Kelly
import (
"fmt"
"log"
"github.com/gocql/gocql"
)
func main() {
cluster := gocql.NewCluster("127.0.0.1")