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()
package contextutil
import (
"context"
"time"
)
// ResetFunc resets the context timeout timer
type ResetFunc func()
@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"
package main
import (
"errors"
"fmt"
"io"
"log"
"net/http"
"os"
@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 February 5, 2025 10:00
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

@salrashid123
salrashid123 / dwd.go
Created April 1, 2020 13:30
Gsuites domain wide delegation/impersonation
package main
import (
"fmt"
"io/ioutil"
"log"
"context"
"cloud.google.com/go/storage"
@patternproject
patternproject / wk2_submission.ipynb
Created March 13, 2020 14:11
Wk2_Submission.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wtbarnes
wtbarnes / push-to-someone-elses-pr.md
Created March 5, 2020 04:49
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