Skip to content

Instantly share code, notes, and snippets.

@barrowkwan
barrowkwan / main.py
Created January 12, 2023 02:22
Demo
if __name__ == '__main__':
pass
@barrowkwan
barrowkwan / custom_keys_git_ssh
Created July 12, 2020 07:36 — forked from vhermecz/custom_keys_git_ssh
Allow configuring multiple ssh deploy keys with git
#!/bin/bash
# Script to use custom ssh keys for various git repositories
# Run without arguments to get usage info.
#
# How it works:
# When used with SSH, git sends the path to the repository in the SSH command.
# @see: https://github.com/git/git/blob/e870325/connect.c#L1268
# We extract this info and search for a key with the name.
# Based on the source, this seems to be used format since v2.0 at least.
# @see: https://github.com/git/git/commit/a2036d7
@barrowkwan
barrowkwan / gencert.go
Created January 6, 2019 23:29
Generate a self-signed certificate in Go
package main
import (
"bytes"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"