Skip to content

Instantly share code, notes, and snippets.

@media only screen and (max-width: 413px) {
}
@media only screen and (min-width: 413px) and (max-width: 767px) {
}
@media only screen and (min-width: 767px) and (max-width: 1023px) {
}
@media only screen and (min-width: 1023px) and (max-width: 1279px) {
@lucaswells
lucaswells / raster2zarr.py
Last active June 24, 2023 03:04
Convert GeoTIFF to Zarr array
import matplotlib.pyplot as plt
import rasterio
from rasterio.windows import Window
import time
import zarr
def convert(raster_filepath, chunk_mbs=1):
"""
Converts raster file to chunked and compressed zarr array. Tested
@sambacha
sambacha / README.md
Last active November 25, 2020 00:05
A general Boilerplate README file for Improvement Proposals

Boilerplate Proposal README file

Changes

-- Added SECURITY section

-- Added 'Libraries' to ## Terminology

-- Added explicit ## LICENSE section

@jswny
jswny / Flexible Dockerized Phoenix Deployments.md
Last active July 3, 2023 05:25
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai