Skip to content

Instantly share code, notes, and snippets.

View shawnhank's full-sized avatar

Shawn Hank shawnhank

View GitHub Profile
@shawnhank
shawnhank / letsencrypt-acme-guide.md
Created February 1, 2023 03:35 — forked from ammgws/letsencrypt-acme-guide.md
Using acme.sh script to renew LetsEncrypt certs using non-standard SSL port

1. Install acme.sh shell script

git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install

Optionally, set the home dir and/or account info (if already have one).
If was previously using LetsEncrypt's certbot, can probably get account info from /etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory/*/regr.json.

@huynhsamha
huynhsamha / Nginx is unable to bind to 443.md
Last active February 1, 2023 10:15
SSH - Configure Nginx on AWS EC2
@jamieparfet
jamieparfet / macOS-mojave-iso.sh
Last active February 11, 2023 19:16
Create an ISO from the mojave installer app
#!/bin/bash
# This assumes that the ~6GB mojave installer is in the /Applications folder.
# If it's not, just open the App Store, search Mojave, and you can download the installer file from there.
hdiutil create -o /tmp/mojave.cdr -size 6g -layout SPUD -fs HFS+J
hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_mojave
sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave
mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ mojave
(*
The Hit List Mail Import
Copyright © 2012 Potion Factory LLC.
Licensed under a Creative Commons Attribution 3.0 License: http://creativecommons.org/licenses/by/3.0/
To customize this script, copy it first to:
@ammgws
ammgws / letsencrypt-acme-guide.md
Last active July 23, 2023 17:19
Using acme.sh script to renew LetsEncrypt certs using non-standard SSL port

1. Install acme.sh shell script

git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install

Optionally, set the home dir and/or account info (if already have one).
If was previously using LetsEncrypt's certbot, can probably get account info from /etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory/*/regr.json.

@mattcarlotta
mattcarlotta / Lets_Encrypt_Synology_Gitlab.MD
Last active August 8, 2023 07:43
Lets Encrypt - Synology NAS + sameersbn/docker-gitlab (HTTPS)

Let's Encrypt - Synology NAS + sameersbn/docker-gitlab

Getting HTTPS on a Synology NAS + Gitlab container is a bit tricky. Using self-assigned OpenSSL certificates is great, but it can only provide SSL certificates that inevitably will be flagged as untrusted by the browser due to the common name being unrecognized/not associated with a trusted SSL provider:

The downside will be that every user that remotely accesses your NAS will be greeted with the above message unless they manually add the certificate to their browser's approved SSL provider list. Instead, here's a work-around to enable HTTPS for both your Synology NAS and a Gitlab container using just one Let's Encrypt certification.

For more information regarding the docker-gitlab installation and set up: Synology Docker

@DuncanIdahoCT
DuncanIdahoCT / Aeon HEM Gen5 (zw095-a).groovy
Last active September 8, 2023 18:32
Aeon HEM Gen5(zwave plus)
/*
* 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:
@zhen-huan-hu
zhen-huan-hu / homelab.markdown
Last active October 10, 2023 04:44
Personal Notes on Home Lab Administration

Personal Notes on Home Lab Administration

This is a collection of personal notes on self-hosted home lab administration. This reference assumes the underlying OS is Ubuntu Server 22.04.

Installing a New Hard Drive

List block devices and get UUIDs for the partitions

It is recommended to use lsblk command to get information about block devices rather than blkid. lsblk provides more information, better control on output formatting and it does not require root permission to get actual information.

@mtrimarchi
mtrimarchi / 01-pihole.conf
Last active October 25, 2023 17:34
pi.hole dnsmasq conf
# /etc/dnsmasq.d/01-pihole.conf
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Dnsmasq config for Pi-hole's FTLDNS
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
@poritsky
poritsky / mail-to-day-one.applescript
Created November 28, 2012 22:00
Create Day One Entry From Selected Message in Apple Mail (Requires Day One CLI)
(*
Apple Mail to Markdown Formatted Day One Entry
!!! IMPORTANT !!!
Requires the Day One Command Line Interface. Download and install from here:
http://dayoneapp.com/tools/
Adapted from 'Apple Mail -- Text File Exporter w/ Basic Header Info' by Justin Lancy:
http://veritrope.com/code/apple-mail-export-to-text-file-w-basic-header-info