Skip to content

Instantly share code, notes, and snippets.

@faph
faph / docker-maven-ghactions-release.md
Last active October 19, 2022 18:30
Automated Docker releases using Maven and GitHub Actions

Automated Docker releases using Maven and GitHub Actions

Life is too short for tedious, manual release processes.

Here, we will use Maven's [Release plugin][maven-release] to execute releases. Instead of triggering the release process manually, we will use a [GitHub Actions][gh-actions] workflow on the master branch. All development work is done on the dev branch (or feature branches) and a release is done when (and only when) the dev branch is merged with the master branch.

jobs:
build:
steps:
- name: Configure git
run: |
git config --global committer.email "[email protected]"
git config --global committer.name "GitHub"
git config --global author.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global author.name "${GITHUB_ACTOR}"
- name: Commit and push build dir

Flood Estimation Report

Date: 01/01/2016
Software: OH Auto Statistical

Input data

River: Dee

Flood Estimation Report

Date: 15/12/2015
Software: OH Auto Statistical

Input data

River: Eden

@faph
faph / uk_crss_to_wgs.py
Last active November 17, 2015 08:36
UK CRSs to WGS84 transformation
import pyproj
COORDS = {
# OSGB_1936_To_WGS_1984_Petroleum transformation
'gb': pyproj.Proj('+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy ' +
'+towgs84=446.448000,-125.157000,542.060000,0.150000,0.247000,0.842000,-20.489000 ' +
'+units=m +no_defs'),
# TM75_To_WGS_1984_2 transformation
'ni': pyproj.Proj('+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +ellps=mod_airy ' +
'+towgs84=482.530000,-130.596000,564.557000,-1.042000,-0.214000,-0.631000,8.150000 ' +
@faph
faph / bld.bat
Last active November 6, 2015 18:51
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt
@faph
faph / conda-build.ps1
Last active November 6, 2015 18:55
use recipe as function argument
Param(
$recipe,
[switch] $upload = $false
)
$user = 'faph'
$channel = 'dev'
$pyversions = '3.3', '3.4', '3.5'
$build_platform = 'win-64'
$other_platforms = 'osx-64', 'linux-64'
@faph
faph / updatechecker.py
Created September 30, 2015 13:57
Check for application update based on latest GitHub release tag
from distutils.version import LooseVersion
import json
import threading
import request
__version__ = '0.0.0'
Update = namedtuple('Update', ['version', 'url'])