Skip to content

Instantly share code, notes, and snippets.

View phargogh's full-sized avatar

James Douglass phargogh

View GitHub Profile
@emlys
emlys / post-commit
Created July 16, 2021 19:29
git post-commit hook to keep one branch updated with changes from another
#!/bin/sh
# post-commit hook to keep one branch updated with all the changes from another
# so that the target branch always has a superset of the changes in the source branch
# do this by rebasing target off of source after each commit to source
SOURCE_BRANCH=example/generate-docs
BRANCH_TO_REBASE=task/31/models-A-D
# get the current branch in the format "* branch_name"
@richpsharp
richpsharp / Dockerfile
Last active April 15, 2020 19:03
Docker build for Python 3.8 GDAL 3.0.4, w/ ZSTD extensions, and PyGeoprocessing 2.0 release
FROM python:3.8-slim-buster as builder
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
cmake build-essential wget ca-certificates unzip pkg-config \
zlib1g-dev libfreexl-dev libxml2-dev
# making directory to avoid this JDK installation bug: https://github.com/geerlingguy/ansible-role-java/issues/64
RUN mkdir /usr/share/man/man1
RUN apt-get install -y openjdk-11-jdk-headless
@mgbckr
mgbckr / install_zsh_on_sherlock.sh
Last active February 22, 2025 13:13
Compiling and installing Zsh without root privileges on Stanford's Sherlock (https://sherlock.stanford.edu) for use in tmux
# Update 2023-07-20:
# I've recently switched to installing `zsh` via `conda` which is a lot less hassle.
# I added it to start automatically in `tmux` with
# `set-option -g default-shell "~/miniconda3/envs/default/bin/zsh"`
#
# # Install Zsh on Sherlock
# Installs Zsh with Oh-My-Zsh without root privileges
# on Stanford's Sherlock (https://sherlock.stanford.edu) for use in tmux
#
# ## Instructions
@codeinthehole
codeinthehole / docker-osx-shared-folders.rst
Last active November 11, 2023 01:22
How to share folders with docker containers on OSX

How to share a folder with a docker container on OSX

Mounting shared folders between OSX and the docker container is tricky due to the intermediate boot2docker VM. You can't use the usual docker -v option as the docker server knows nothing about the OSX filesystem - it can only mount folders from the boot2docker filesystem. Fortunately, you can work around this using SSHFS.