Skip to content

Instantly share code, notes, and snippets.

View markusritschel's full-sized avatar

Markus Ritschel markusritschel

View GitHub Profile
@markusritschel
markusritschel / map_plots.py
Last active November 15, 2023 23:58
Accessor for cartopy.GeoAxes objects to simplify adding features to (stereographic) map plots
from abc import ABC, abstractmethod
from matplotlib import pyplot as plt, path as mpath
import functools
import cartopy
import cartopy.crs
import cartopy.mpl.geoaxes
import numpy as np
def register_geoaxes_accessor(accessor_name):
@markusritschel
markusritschel / pdfcompress
Last active August 21, 2024 08:33
Shortcut for compressing PDF files. Put this file in a directory that is in your $PATH. Then execute `pdfcompress -h` in your terminal for usage info.
#!/bin/bash
function myHelp () {
cat <<-END
Compresses a PDF file.
The output file will be named "inputfile_compressed.pdf".
Usage:
------
pdfcompress <QUALITY> <PDF_FILE>