Skip to content

Instantly share code, notes, and snippets.

View IronSavior's full-sized avatar

Erik Elmore IronSavior

View GitHub Profile
@IronSavior
IronSavior / matcher_test.go
Created May 4, 2022 00:37
Use Gomega matchers with gomock
package matcher_test
import (
"fmt"
"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@IronSavior
IronSavior / activity.js
Created October 26, 2022 00:07
Google Drive / Drive Activity API
const { google } = require('googleapis');
const config = {
auth_scopes: [
'https://www.googleapis.com/auth/drive.activity.readonly',
],
}
async function activity_for({ ancestorName, itemName }) {
@IronSavior
IronSavior / conway.go
Created July 14, 2023 14:30
Conway's Type-Safe Game of Life
package main
import (
"fmt"
)
type Loc struct { X, Y int }
func (l Loc) Neighbors() []Loc {
neighbors := make([]Loc, 0, 8)