Skip to content

Instantly share code, notes, and snippets.

@floehopper
floehopper / install.sh
Created August 8, 2018 14:08
Installing (and building native extensions for) RedCloth gem on Ruby v1.8.7
bundle config --local build.RedCloth --with-cflags="-w"
bundle install
@floehopper
floehopper / install.sh
Last active August 8, 2018 13:53
Installing Ruby v1.8.7 on OSX High Sierra using rbenv
brew install gcc@4.9
export RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl`
export CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl`
rbenv install 1.8.7-p375
@floehopper
floehopper / Gemfile
Last active June 22, 2018 13:35
Mocha issue 329
source 'https://rubygems.org'
gem 'rspec'

Keybase proof

I hereby claim:

  • I am floehopper on github.
  • I am floehopper (https://keybase.io/floehopper) on keybase.
  • I have a public key whose fingerprint is 7B45 F05D 5E45 180B 26B8 C9B9 0434 C9E0 037B 0884

To claim this, I am signing this object:

$ wget https://github.com/<username>.keys
$ ssh-keygen -e -f <username>.key -m PKCS8 > <username>.key.pkcs8
$ openssl rsautl -encrypt -pubin -inkey <username>.key.pkcs8 -in plain.txt -out encrypted.txt
@floehopper
floehopper / 2018-04-10-whitehall-code-authorship.md
Created April 10, 2018 08:20
GOV.UK Whitehall app code authorship
$ git ls-tree -r -z --name-only HEAD | xargs -0 -n1 git blame --line-porcelain HEAD | grep "^author " | sort | uniq -c | sort -nr

56161 author David Heath
24554 author Tekin Suleyman
14772 author Murray Steele
12286 author Edd Sowden
11746 author Andrew Garner
9137 author James Mead
8358 author russell thorn
@floehopper
floehopper / ddclient-help.txt
Last active March 28, 2018 16:06
2SS RPi dynamic DNS configuration
== NIC specific variables and examples:
o 'changeip'
The 'changeip' protocol is used by DNS services offered by changeip.com.
Configuration variables applicable to the 'changeip' protocol are:
protocol=changeip ##
server=fqdn.of.service ## defaults to nic.changeip.com
login=service-login ## login name and password registered with the service

Achievements

  • Added functionality to Asset Manager to support Whitehall attachments, e.g. access-limiting
  • Identified a problem in serving draft attachments in the AWS integration environment

Ongoing and next

  • Continued preparations to start serving Whitehall attachments from Asset Manager
    • Updating state of assets in Asset Manager when state changes in Whitehall
  • Preview of CSV attachments
@floehopper
floehopper / govuk-development-vm.md
Last active February 28, 2018 15:46
Setup GOV.UK development VM with local SSO, Whitehall & its draft stack

Data replication

The idea here is to load the routes for the router and draft-router. Life's too short to work out how to create the routes manually!

  • cd /var/govuk/govuk-puppet/development-vm/replication
  • Apply replicate-data-local.diff patch to skip all dbs on mongo-1.backend & api-mongo-1.api
  • Run the following command to import data for router & draft-router: ./replicate-data-local.sh -s -d backups/YYYY-MM-DD -p -q -e -t -i 'collections_publisher contacts release search_admin tariff_admin tariff_temporal'

Authenticating proxy

@floehopper
floehopper / commit.txt
Created February 20, 2018 10:51
Publish event for force_publish within EditionUnwithdrawer#perform!
commit 3253a2b7cdf1ba8b60365638ad1b517bbc1e30fd
Author: James Mead <james@floehopper.org>
Date: Sun Feb 18 12:21:40 2018 +0000
Publish event for force_publish within EditionUnwithdrawer#perform!
The EditionUnwithdrawer was already publishing an 'unwithdrawn' event to
the notifier for the originally withdrawn edition which ends up as
superseded, but it was not publishing a 'force_publish' event for the
new draft edition which is force-published.