Skip to content

Instantly share code, notes, and snippets.

View JamesGardiner's full-sized avatar

James Gardiner JamesGardiner

View GitHub Profile
@JamesGardiner
JamesGardiner / rastermerege-rasterio,py
Created May 23, 2023 11:18 — forked from nishadhka/rastermerege-rasterio,py
Raster merge using rasterio
import rasterio.merge
bounds=None
res=None
nodata=None
precision=7
def merge(input1,bounds, res, nodata, precision):
import warnings
warnings.warn("Deprecated; Use rasterio.merge instead", DeprecationWarning)
@JamesGardiner
JamesGardiner / git-commit-template.md
Created October 30, 2022 08:31 — forked from lisawolderiksen/git-commit-template.md
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

#!/bin/sh
function install_wireguard () {
echo "Downloading Wireguard ($RELEASE)..."
FILENAME="wireguard-v2.0-$BOARD-$RELEASE.deb"
DEB_URL="https://github.com/Lochnair/vyatta-wireguard/releases/download/$RELEASE/$FILENAME"
if (/usr/bin/curl -s -L -o /tmp/$FILENAME $DEB_URL); then
echo "Installing $FILENAME..."
dpkg -i /tmp/$FILENAME
rm -f /tmp/$FILENAME
## within current branch, squashes all commits that are ahead of master down into one
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case)
## commit any working changes on branch "mybranchname", then...
git checkout master
git checkout -b mybranchname_temp
git merge --squash mybranchname
git commit -am "Message describing all squashed commits"
git branch -m mybranchname mybranchname_unsquashed
git branch -m mybranchname