Skip to content

Instantly share code, notes, and snippets.

View kcotten's full-sized avatar

kcotten

View GitHub Profile
@hrdtbs
hrdtbs / .vscode.settings.json
Created September 17, 2019 06:39
vscode settings: go modules, gopls, golangci-lint
{
// Go Modules
"go.toolsEnvVars": {"GO111MODULE": "on"},
// Formatter
"go.useLanguageServer": true,
"go.alternateTools": {
"go-langserver": "gopls"
},
"go.languageServerExperimentalFeatures": {
"format": true,
@thurt
thurt / revprox.go
Last active March 31, 2024 05:14 — forked from JalfResi/revprox.go
Simple reverse proxy in Go (forked from original to use a struct instead of a closure)
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@chrisgillis
chrisgillis / ssl_smtp_example.go
Created April 16, 2014 14:48
Golang SSL SMTP Example
package main
import (
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"crypto/tls"
)
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active July 2, 2024 14:42
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"