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:
@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 / 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)"
@shawnhank
shawnhank / useful-one-liners.sh
Created August 24, 2021 18:14 — forked from johnnypea/useful-one-liners.sh
Useful one liners
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
/*
* Aeon HEM Gen5(zwave plus)
*
* Copyright 2016 Dillon A. Miller
*
* v0.8 of Aeon HEM Gen5(zwave plus) code, released 04/15/2016 for Aeotec Model zw095-a
* This Gen5 device handler is not backward compatible with the Aeon V1 or V2 device. If your model number is not zw095-a, don't use it.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at: