Skip to content

Instantly share code, notes, and snippets.

View rnorth's full-sized avatar

Richard North rnorth

View GitHub Profile
@rnorth
rnorth / _notes.md
Last active July 18, 2017 15:20
2.0 API refactor thoughts

Testcontainers v2.0 API changes - idea 1

This is a rough sketch of how a revised API for Testcontainers could look - don't read too much into it.

Key goals:

  • How it works should be simple and obvious for the benefit of users and contributors
  • Don't lose too much in-IDE 'discoverability' of the API when compared with the current implementation
  • Break dependency on JUnit to allow usage with other testing frameworks
  • Have separate APIs for configuring containers and using a running container
package com.example;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testcontainers.containers.BrowserWebDriverContainer;
import org.testcontainers.containers.DockerComposeContainer;
@rnorth
rnorth / mvn-release
Last active September 7, 2016 11:02
Alternative tool for performing Maven Releases - simpler and easier to reason about
#!/usr/bin/env bash
# Maven release helper. Copyright (c) 2016 Richard North <rich.north@gmail.com>
# Usage: mvn-release.sh PROFILES
# where PROFILES should be any maven profile activations to pass through, e.g. `-PprofileA`
#
# Based on this article: https://axelfontaine.com/blog/final-nail.html
#
# IMPORTANT: follow setup steps in that article for required POM configuration settings
set -o errexit
@rnorth
rnorth / qmvn
Last active February 1, 2016 09:04
qmvn
#!/usr/bin/env bash
# qmvn (quick maven)
#
# Maven wrapper script to accelerate the build of multi-module projects
# This script detects which modules have been modified since the last build, and executes maven in `-amd -pl ...` mode.
# This means only modules with changes to source code or their POMs, or which depend on a changed module, get built.
# See this page for details of how these flags accelerate the build:
# http://blog.sonatype.com/2009/10/maven-tips-and-tricks-advanced-reactor-options/
#
# Authors:
@rnorth
rnorth / client_generation.md
Last active December 17, 2015 10:13
On generation of API clients from a spec

Goals

Generate client code from an existing API spec written in Swagger format

  • Build type-safe clients for HTTP APIs, so that compatibility is verified at compile time
  • Produce client code that is usable as-is and with an express goal of no manual modification, so that generation can be a routine step in a project's build process
  • Support multiple languages for clients on suitable platforms. Mainly support languages that have static typing
  • Provide an easy-to-understand fluent interface
  • Generate both client (accessor) and model (POJO/struct) from the spec
@rnorth
rnorth / bmobile.mobileconfig
Created September 2, 2015 13:11
iOS 9 compatible APN settings mobileconfig file for Japan B-Mobile SIM Free Data
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ConsentText</key>
<dict>
<key>default</key>
<string>B-Mobile SIM フルーdata</string>
</dict>
<key>PayloadContent</key>
@rnorth
rnorth / keybase.md
Last active November 9, 2019 09:48
keybase.md

Keybase proof

I hereby claim:

  • I am rnorth on github.
  • I am richnorth (https://keybase.io/richnorth) on keybase.
  • I have a public key whose fingerprint is EBEE 5EE7 3820 918C F7F9 D867 EDF4 C124 5923 343E

To claim this, I am signing this object:

@rnorth
rnorth / gist:92f0cea7f0b850d6e334
Last active August 29, 2015 14:22
Chrome/Firefox in docker, launched as a JUnit rule, ready for use in Selenium/Webdriver tests. Built on top of https://github.com/rnorth/test-containers
Now merged into master, and released as v0.9.1.
@rnorth
rnorth / keybase.md
Last active August 29, 2015 14:19
keybase.md

Keybase proof

I hereby claim:

  • I am rnorth on github.
  • I am richnorth (https://keybase.io/richnorth) on keybase.
  • I have a public key whose fingerprint is 8AC1 FA76 2457 703F 759C 8CF1 E052 0DA8 3FDC BD43

To claim this, I am signing this object:

@rnorth
rnorth / pure-theme.fish
Last active May 4, 2016 20:45 — forked from jonathanmarvens/pure-theme.fish
Pure themed prompt for Fish shell, with display of last command duration and time of day
###########################################
# Copyright (c) 2014 Jonathan Barronville #
# Minor tweaks by Richard North #
# License: MIT. #
###########################################
function fish_prompt
set last_command_status $status
echo ''