Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
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 April 14, 2024 16:26
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"
@StevenACoffman
StevenACoffman / GPG_and_GIT.md
Last active March 9, 2024 22:10 — forked from JamesOBenson/Generating a secure SSH Key and commands
SSH Generation and commands for GIT and GPG

GPG and GIT and SSH ... OH MY!

ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C gears@umich.edu -N ''
  • Then you won't be prompted for a passphrase. However, if you did have a passphrase:
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C gears@umich.edu -N 'Really do not use this passphrase'
  • Then you will be prompted to type your passphrase every time you interact with git remote (pull, push, fetch, etc.) This is intolerable.