Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am hordurk on github.
  • I am hordurk (https://keybase.io/hordurk) on keybase.
  • I have a public key ASABg9f7ZgqEyVgr8Aq8OY2X54fFEkT2soD8xL15NOggsAo

To claim this, I am signing this object:

{ "body": { "key": { "eldest_kid": "01200183d7fb660a84c9582bf00abc398d97e787c51244f6b280fcc4bd7934e820b00a", "host": "keybase.io", "kid": "01200183d7fb660a84c9582bf00abc398d97e787c51244f6b280fcc4bd7934e820b00a", "uid": "b6750653d37751c3d9a6bd5f84371119", "username": "hordurk" }, "merkle_root": {

@hordurk
hordurk / letsencrypt_2017.md
Created July 23, 2017 08:54 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@hordurk
hordurk / grouped_light.py
Last active January 28, 2024 15:46 — forked from evelant/grouped_light.py
Grouped light platform for Home Assistant
import logging
# Import the device class from the component that you want to support
from homeassistant.components import light
from homeassistant.const import (STATE_OFF, STATE_ON, SERVICE_TURN_ON, SERVICE_TURN_OFF, ATTR_ENTITY_ID)
CONF_NAME = 'name'
CONF_ENTITIES = 'entities'
_LOGGER = logging.getLogger(__name__)