Skip to content

Instantly share code, notes, and snippets.

View atc0005's full-sized avatar

Adam Chalkley atc0005

View GitHub Profile
@atc0005
atc0005 / config-git-ssh-access.sh
Created March 6, 2020 12:55
Configure Git to use SSH for private repo access
git config url."git@github.com-public".insteadOf "https://github.com"
# Credit:
#
# https://medium.com/cloud-native-the-gathering/go-modules-with-private-git-repositories-dfe795068db4
package main
import (
"encoding/json"
"io/ioutil"
"net/http"
"os"
"regexp"
"time"
)
@atc0005
atc0005 / Makefile
Created October 17, 2019 17:55 — forked from TheHippo/Makefile
Golang Makefile example
OUT := binariy-name
PKG := gitlab.com/group/project
VERSION := $(shell git describe --always --long --dirty)
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/)
all: run
server:
go build -i -v -o ${OUT} -ldflags="-X main.version=${VERSION}" ${PKG}