Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
@StevenACoffman
StevenACoffman / oktaverify2totp.md
Created February 19, 2026 00:01 — forked from kamilhism/oktaverify2totp.md
Get TOTP secret key for Okta Verify
  1. Get the content of the QR for Okta Verify app setup. It looks like this: oktaverify://email@domain.com/?t=XXXXX&f=YYYYY&s=https://DOMAIN.okta.com&issuer=DOMAIN.okta.com&isIdxEnabled=true
  2. Replace XXXXX, YYYYY and DOMAIN to your values in curl below:
curl --request POST \
  --url https://DOMAIN.okta.com/idp/authenticators \
  --header 'Accept: application/json; charset=UTF-8' \
  --header 'Accept-Encoding: gzip, deflate' \
  --header 'Authorization: OTDT XXXXX' \
  --header 'Content-Type: application/json; charset=UTF-8' \
@StevenACoffman
StevenACoffman / AlloyDB_Change_To_Public_IP_RequireSSL.md
Last active November 10, 2025 22:06
AlloyDB_Change_To_Public_IP_RequireSSL.md
Screenshot 2025-11-10 at 5 01 35 PM ### Procedure:
  • Step 1: Go to https://console.cloud.google.com/alloydb/clusters?referrer=search&project=khan-academy Select Cluster, and Edit Read Pool
  • Step 2: Under Network Security, Select Require SSL (and optionally Enforce mTLS via AlloyDB connectors)
  • Step 3: Under Connectivity, Select Enable Public IP
  • Step 4: Unhide Advanced Configuration vieo, then Under Flags, click "Add database flag" and ensure at least these minimum flags are set to these values (other flags also may be set) | flag | value | |---|---|
@StevenACoffman
StevenACoffman / Go_Struct_Mapping_Options.md
Last active November 23, 2025 21:52
Go Struct Mapping Options
@StevenACoffman
StevenACoffman / git-push-to-someone-elses-pr.md
Last active November 17, 2025 23:54 — forked from wtbarnes/push-to-someone-elses-pr.md
Brief instructions for how to modify and push to someone else's PR on github

How to Push to Someone Else's Pull Request

Let's say contributor has submitted a pull request to your (author) project (repo). They have made changes on their branch feature and have proposed to merge this into origin/master, where

origin -> https://github.com/author/repo.git

Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called

@StevenACoffman
StevenACoffman / diy_sts.md
Created September 7, 2025 17:52 — forked from salrashid123/diy_sts.md
GCP Authentication with custom STS Server

Simple DIY STS server Google Cloud Application Default Credential

or...how to use ADC and run your own STS token broker

An STS server will exchange one token for another. This protocol is used by GCP Workload Federation.

THis example runs your own STS server with GCP where the STS server accepts a source token, validates it and the returns a gcp access_token

For more information about STS servers, see

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@StevenACoffman
StevenACoffman / proto-to-map.go
Created August 29, 2025 01:12 — forked from IshanDaga/proto-to-map.go
Create a go map from any proto message without proto->json->map
package main
import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protodesc"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/types/descriptorpb"
"google.golang.org/protobuf/types/dynamicpb"
)
@StevenACoffman
StevenACoffman / importing-protobuf-guidelines.md
Created June 2, 2025 14:14
Importing proto files from an external Go library
// ProtoDiff generates an indented summary of the diff between two protos'
// YAML representations. See ProtoToYAML for documentation on rewrites.
func ProtoDiff(a, b protoutil.Message, args DiffArgs, rewrites func(interface{})) string {
	toYAML := func(m protoutil.Message) string {
		if m == nil {
			return ""
		}
 str, err := ProtoToYAML(m, false /* emitDefaults */, rewrites)