Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
@rafi
rafi / k3d-keycloak.md
Last active August 21, 2023 23:55
Keycloak and oauth2-proxy using k3d & ngrok:

K3d and Keycloak

Prerequisites

Ensure docker, k3d and ngrok are installed.

brew update
brew install --cask docker ngrok
brew install k3d
function rest(dag) {
layering = d3.layeringSimplex()
decrossing = d3.decrossOpt()
coords = d3.coordQuad()
@salrashid123
salrashid123 / signer.go
Created August 4, 2020 23:05
basic GCP IAMCredentials `crypto.Signer()`
package kms
import (
"crypto"
"encoding/base64"
"io"
"sync"
"context"
"fmt"
@StevenACoffman
StevenACoffman / time.md
Last active July 8, 2022 18:29
Time format

From Go: Format a time or date

Consider just running dateparse:

go get -u github.com/araddon/dateparse/dateparse
dateparse --timezone="UTC" "2019-11-20T22:32:59.882Z"
dateparse --timezone="America/Detroit" "2017-07-19 03:21:00"

Go: Format a time or date

@vardius
vardius / main.go
Last active May 2, 2022 23:03
Go errors with stack trace
package main
import (
"bytes"
"errors"
"fmt"
"runtime"
)
type AppError struct {
@MichaelCurrin
MichaelCurrin / README.md
Last active May 16, 2024 12:45
GitHub GraphQL - Get Pull Requests using GH's GraphQL API

Get Pull Requests using GH's GraphQL API

How to get Pull Requests data using Github in the browser, or using the API to allow for automating reporting or building in values into a website.

Resources

@pdecat
pdecat / gcs-signed-url-main.go
Created January 31, 2020 17:39
Creating a GCS Signed URL without a Service Account Key from a GCE instance or a GKE Pod using Workload Identity
package main
import (
"context"
"flag"
"log"
"net/url"
"time"
"cloud.google.com/go/compute/metadata"
@droyo
droyo / grpc-generate-access-token.go
Created December 26, 2019 23:19
GCP iamcredentials.googleapis.com GenerateAccessToken GRPC example
package main
import (
"log"
"flag"
"path"
"time"
"context"
"github.com/kr/pretty"
@tvvignesh
tvvignesh / .gitlab-ci.yml
Created December 22, 2019 17:46
Example on running Skaffold with GITLAB CI for Kubernetes in GKE (Make sure you modify it appropriately and set GCP_SERVICE_KEY and GCP_PROD_SERVICE_KEY variable in Gitlab with the service account json value)
services:
- docker:dind
stages:
- development
- production
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ''
@salrashid123
salrashid123 / main.go
Created November 9, 2019 19:09
Sample golang app that uses the Google CLoud Admin SDk to create a user and then add that user to a specific google group
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"golang.org/x/net/context"