Skip to content

Instantly share code, notes, and snippets.

View rhowe-gds's full-sized avatar
💭
Deleting code

Russell Howe rhowe-gds

💭
Deleting code
  • GDS, Cabinet Office, UK Government
View GitHub Profile
<TCTokenType>
<ServerAddress>#{FOO}</ServerAddress>
<SessionIdentifier>#{SESSIONID}</SessionIdentifier>
<RefreshAddress>https://example.org</RefreshAddress>
<Binding>urn:liberty:paos:2006-08</Binding>
</TCTokenType>
@rhowe-gds
rhowe-gds / vpn
Last active June 4, 2019 15:44
VPN connection script
#!/usr/bin/env bash
set -euo pipefail
usage="$0: <up|down> [connection name]"
action="${1?$usage}"
connection="${2:-GDS VPN Developer}"
oath_key=vpn
pass_key=gds/vpn
@rhowe-gds
rhowe-gds / ProxyTest.java
Created January 2, 2019 17:01
Testing how Java's proxy settings behave
import com.google.common.collect.ImmutableList;
import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.URISyntaxException;
@rhowe-gds
rhowe-gds / generate-gpg-yubikey.sh
Last active April 30, 2019 17:41
Generate GPG keys and put them on a Yubikey
#!/bin/bash
set -euo pipefail
GNUPGHOME=$(mktemp -d)
cleanup() {
echo rm -rf "$GNUPGHOME"
killall gpg-agent || :
}
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFt2zPQBEAC7Ps0AFvjmuk9arSIncjX02Q2CUlQquvNHLABxdZQgc97Ja/9x
0dECWgBP0f7tA7zonzX8JQi3B5hvSmcSb+TKSSrp6WmduEY1Cz+/pUmBD2eDAZ02
u4zXHMHR3TaR8GrSCI171//1qRz49/NzrVM7C1TBXnGCI3aPpEDgK6gbPwTFtKwe
Vj+i2Xgyaq8Xed6G+P0HeL92BJbKeFtytNJpHPOXY3fPnyflVOmnU4FK6Aeo2dpi
tDn+qoVpQQVVLRiZlBXN7YEdDlda0evfmd9eX8zsCMeYTvd0tfXfTLPovxEy9DN3
+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