Skip to content

Instantly share code, notes, and snippets.

@isutare412
isutare412 / self-signed-certificates.md
Created September 24, 2022 05:44
Generate self-signed certificates for local development
  1. Generate private key for local test CA.
openssl genrsa -out localTestCA.key 2048
  1. Generate certificate of the local test CA.
openssl req -x509 -new -nodes -key localTestCA.key -sha256 -days 1095 -out localTestCA.crt
@isutare412
isutare412 / config
Created May 11, 2021 03:08
SSH config using proxy / jumbox / bastion
Host your-jumpbox
HostName xxx.xxx.xxx.xxx
User user1
IdentityFile ~/.ssh/private_key_for_jumpbox
Host endpoint1
HostName xxx.xxx.xxx.xxx
User user2
ProxyCommand ssh -q -W %h:%p your-jumpbox
@isutare412
isutare412 / pre-receive-block.sh
Last active November 17, 2021 06:21
Git server hook tha blocks git push except users on whitelist
#!/bin/sh
#
# Blocks git push except permitted commiters.
#
# To enable this hook, rename this file to "pre-receive".
# parse old, new, ref from stdin
read OLD NEW REF
# get author and committer