Skip to content

Instantly share code, notes, and snippets.

View shawnhank's full-sized avatar

Shawn Hank shawnhank

View GitHub Profile
version: '3'
services:
portainer:
image: portainer/portainer:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
version: '3'
services:
traefik:
image: traefik:v2.0
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
version: '3'
services:
portainer:
image: portainer/portainer:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
@shawnhank
shawnhank / csr.conf.md
Created August 6, 2021 23:32 — forked from yidas/csr.conf.md
Certificate(CSR) configuration file

Openssl commands:

openssl genrsa -out self-ssl.key
openssl req -new -key self-ssl.key -out self-ssl.csr -config csr.conf
openssl x509 -req -days 365 -in self-ssl.csr -signkey self-ssl.key -out self-ssl.crt -extensions req_ext -extfile csr.conf

Sign from Root CA: openssl x509 -req -days 365 -extensions req_ext -extfile csr.conf -CA RootCA.crt -CAkey RootCA.key -in self-ssl.csr -out self-ssl.crt

@shawnhank
shawnhank / make-local-cert.sh
Created August 7, 2021 07:07 — forked from jdeathe/make-local-cert.sh
Generate a Root CA + Intermediate CA for local (internal) use on Mac OSX using cfssl and add the intermediate certificate to your keychain so it can be trusted by your local browser.
#!/usr/bin/env bash
# REF: https://github.com/cloudflare/cfssl
# Change working directory
cd -- "$(
dirname "${0}"
)" || exit 1
readonly CA_ROOT_CERT_KEY="ca-root"
@shawnhank
shawnhank / newcert.sh
Created August 8, 2021 06:07 — forked from sandipb/newcert.sh
Bash script to generate new server certificates and private key, for the OpenSSL Certificate Authority guide by Jamie
#!/bin/bash
# set -x
set -e
cd $(dirname $0)
# The path to the homebrew install on mac. Change to point to your own installation
OPENSSL="/usr/local/Cellar/openssl@1.1/1.1.1g/bin/openssl"
NAME=${1:?Need a hostname for generating certs}
DAYS=375
export SAN="DNS:$NAME"
@shawnhank
shawnhank / !proxmox_k3s_cluster.sh
Created August 11, 2021 04:44 — forked from ilude/!proxmox_k3s_cluster.sh
Proxmox k3s cluster creation scripts
#!/bin/bash
# curl -s https://gist.githubusercontent.com/ilude/457f2ef2e59d2bff8bb88b976464bb91/raw/cluster_create_setup.sh?$(date +%s) > ~/bin/setup_cluster.sh; chmod +x ~/bin/setup_cluster.sh; setup_cluster.sh
echo "begin cluster_create_setup.sh"
export CREATE_TEMPLATE=1 #false
while test $# -gt 0; do
case "$1" in
--template)
export CREATE_TEMPLATE=0 #true
@shawnhank
shawnhank / cloudflare-pve-acme.sh
Created August 11, 2021 04:44 — forked from fuyuanli/cloudflare-pve-acme.sh
acme.sh + Proxmox VE
# CloudFlare API
#
# Please install "acme.sh" before runnung this script.
# curl https://get.acme.sh/ | sh
#
export CF_Email="Your_CloudFlare_Account@example.com"
export CF_Key="Your_CloudFlare_API_Key"
/root/.acme.sh/acme.sh --issue \
-d $DOMAIN \
@shawnhank
shawnhank / Twilight.bbcolors
Created August 12, 2021 05:44 — forked from kahlil/Twilight.bbcolors
A Twilightish colorscheme for BBEdit 10+. Drop the file into '~/Library/Application Support/BBEdit/Color Schemes/' to use it.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundColor</key>
<string>rgba(0.000000,0.000000,0.000000,1.000000)</string>
<key>CommentsColor</key>
<string>rgba(0.569157,0.569091,0.569188,1.000000)</string>
<key>CtagsIdentifierColor</key>
<string>rgba(0.6,0.0,0.4,1.0)</string>
@shawnhank
shawnhank / bbedit_colours.sh
Created August 12, 2021 05:44 — forked from pgib/bbedit_colours.sh
My BBEdit Color Scheme
defaults write com.barebones.bbedit Color:Background -string "rgb(0,0,0)"
defaults write com.barebones.bbedit Color:CTagsIdentifier -string "rgb(57825,39937,11422)"
defaults write com.barebones.bbedit Color:ColorAttributesSeparately -string 1
defaults write com.barebones.bbedit Color:Comment -string "rgb(21845,21845,21845)"
defaults write com.barebones.bbedit Color:Comment:Ruby -string "rgb(34992,34992,34992)"
defaults write com.barebones.bbedit Color:Foreground -string "rgb(65535,65535,65535)"
defaults write com.barebones.bbedit Color:Foreground:CSS -string "rgb(56342,56342,56342)"
defaults write com.barebones.bbedit Color:GuideContrast -string 7
defaults write com.barebones.bbedit Color:HTMLAnchor -string "rgb(43690,0,0)"
defaults write com.barebones.bbedit Color:HTMLAttributeName -string "rgb(57528,45076,5799)"