Skip to content

Instantly share code, notes, and snippets.

View geowurster's full-sized avatar
🛰️

Kevin Wurster geowurster

🛰️
View GitHub Profile

How to deploy a webpage in 2022

Instructions for getting a [mostly] static website onto a custom domain, with https encryption, for [mostly] free. I'm finally writing this down after getting stuck on step 10 way too many times. Godspeed.

  1. Purchase the top-level domain - gandi.net is my current preferred registrar. Hopefully this will be the only cash you drop in this process.
  2. Create a new public repository on github.
  3. Clone the new repo locally and create your site content package, even starting with something as simple as a standalone index.html.
  4. Add a file called CNAME to the repo, containing only a single line with your just-purchased domain in it. e.g. domain.com.
  5. Commit the content to github.
  6. In the settings --> pages menu of the repository on github.com, point to the correct branch, and enter the domain under "Cu
@geowurster
geowurster / gdal-trunk-ci-failure.py
Created December 19, 2017 01:13
GDAL Trunk CI Failure
import affine
import rasterio
from rasterio import shutil as rio_shutil
from rasterio.enums import ColorInterp
path_4band_no_colorinterp = '4band-no-ci.tif'
# This seems to be a GDAL default. GDAL 2.2 allows 'undefined' for first
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥
@geowurster
geowurster / rasterio-env-improvements.md
Last active November 13, 2017 01:52
Improving Rasterio's Management of the GDAL Environment

rasterio.Env.options does not accurately represent the current state of the environemnt:

import rasterio as rio

with rio.Env(option='whatever') as env:
    print("env.options", env.options, )
    print("")
    print("rio.env._env.options", rio.env._env.options)
@geowurster
geowurster / libais-0.16-todo.md
Last active October 30, 2015 17:11
Towards a libais v1.16

Towards a 1.16

  • Close PR #119
  • Close PR #117
  • Convert readme to RST
  • Convert changelog to Markdown
  • Move send_data.py -> utils
  • Move VERSION -> ais/__init__.py
  • Move ais_lut.py -> ais/enums|lut.py (or something similar? looks like they're not in use)
@geowurster
geowurster / parser.py
Last active October 24, 2015 04:04
libais parsing
import ais.tag_block
import ais.vdm
import ais
import json
import lru # pip install lru-dict
import collections
FIELD_MAP = {
@geowurster
geowurster / gpsdio-schema.py
Last active November 3, 2015 05:44
Towards better gpsdio schema validation
"""
Schema definition
"""
from pprint import pprint
import collections
import six
@geowurster
geowurster / gist:767742af70d6e2db4fc9
Last active August 29, 2015 14:21
Click CLI Examples
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Click CLI Exploration\n",
"===========\n",
"\n",
"Demonstrating option/argument callbacks, `click.ClickException` and why `sys.exit()` calls are unnecessary."
@geowurster
geowurster / gist:661c43a8a7b5de2e499f
Last active August 29, 2015 14:20
Cheapo Geometric Mean
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Computing a Cheap Geometric Mean\n",
"================="
]
},
@geowurster
geowurster / gist:03848f2cd20dccf1a575
Last active August 29, 2015 14:18
GPSD Message Modification Functions
  • Force message
  • Force but keep invalid. Also keep values that are out of bounds.
  • Strip off fields that don't belong
  • Complete a message by adding default fields that are missing
  • Validates whether the fields and values are correct for a given message - returns boolean
  • Import a message - decodes datetime fields to a datetime.datetime object, etc.
  • Export a message - encodes datetime.datetime fields to a string, etc.
  • Given a type, get a complete message that only contains default values.

Let validate failures raise exceptions in the reader that are caught by skip failures