Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
@StevenACoffman
StevenACoffman / go-mod-update.md
Last active November 14, 2021 16:20
go mod update

If you use cgo, then a lot of go module tools get really slow per golang/go#29427

For example, this is really slow:

go list -m -u all

Maybe Instead:

@StevenACoffman
StevenACoffman / pull-request-types.md
Created October 3, 2021 15:49
pull-requests-types.md

After reading Rouan Wilsenach’s article on Ship / Show / Ask, I realized that when creating a pull request, I’m thinking about:

  • How can I confidently get my code out of the door?
  • Will my changes pass the automated CI checks?
  • Will my changes pass a self-review? I.e. would I approve my own PR?
  • Will my colleagues be able to give me good feedback?

So this gives us 7 types of pull-request:

No Pull Request / Ship
@StevenACoffman
StevenACoffman / stackoverflow-source.md
Created October 3, 2021 00:09
Get Source code from Stack overflow
@StevenACoffman
StevenACoffman / notes-testing.md
Last active October 27, 2023 10:30
HTTP testing in Go

Goal: Less Badness

  • Enable Quality
  • Enable Maintenance
  • Enable Validation

Testing Terms

  • Stub - an object that provides predefined answers to method calls.
  • Mock - an object on which you set expectations.
  • Fake - an object with limited capabilities (for the purposes of testing), e.g. a fake web service.
@StevenACoffman
StevenACoffman / a-non-root-ssh-keys-in-kube.md
Last active September 5, 2022 20:21
SSH keys in kubernetes as non-root
# get your own login
query { 
  viewer { 
    login
  }
}

List the organizations for a user:

@StevenACoffman
StevenACoffman / careers.md
Last active November 30, 2023 19:34
Careers

Change jobs every two to three years.

  • The Carrot
    CLICK ME

    The worst kept secret is that employees are making less on average every year. There are millions of reasons for this, but we’re going to focus on one that we can control. Staying employed at the same company for over two years on average is going to make you earn less over 10 years by about 50% or more.

    Keep in mind that 50% is a conservative number at the lowest end of the spectrum. The longer you work, the greater the difference will become over your lifetime.

@StevenACoffman
StevenACoffman / main.go
Created May 19, 2021 00:59 — forked from salrashid123/main.go
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"