Skip to content

Instantly share code, notes, and snippets.

View michaeljdennis's full-sized avatar
:octocat:
Building

Michael Dennis michaeljdennis

:octocat:
Building
View GitHub Profile
@jrapoport
jrapoport / different-ssh-deploy-keys-multiple-private-repos-github-go-mod.md
Last active September 21, 2023 09:10
How to use different ssh deploy keys for multiple private github repositories with Golang Modules (go mod)

How to use different ssh deploy keys for multiple private github repositories with Go Modules

Let's assume you are using Go Modules and have a go.mod file that contains multiple private repos each with a different ssh key. How can you get go mod download to do the right thing -- i.e. use ssh key A with private repo A and ssh key B with private repo B?

Ok, here we go!

Let's assume you have some github.com user with multiple private repos:

https://github.com/someuser/private-repo-1

@stupidbodo
stupidbodo / aes_encryption.go
Last active January 3, 2024 10:29
AES Encryption Example in Golang
// Playbook - http://play.golang.org/p/3wFl4lacjX
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@JeffreyWay
JeffreyWay / DogsController.php
Last active December 11, 2015 20:08
Testable Laravel.
<?php
class DogsController extends BaseController {
protected $db;
// Let the db-layer be injected. Don't worry...
// Laravel will automatically inject the dependencies for you.
function __construct(DogInterface $db) {
$this->db = $db;
}