Skip to content

Instantly share code, notes, and snippets.

View steventux's full-sized avatar

Steve Laing steventux

View GitHub Profile
steventux / devtools setup
Created November 22, 2018 19:47
Quick script to set up vim and git prompt
View devtools setup
# Save git-prompt script to home dir
echo "Fetching git prompt script"
curl > ~/
echo "Adding git-prompt to bash"
# Source it and amend bash prompt
cat << 'END' >> ~/.bashrc
steventux /
Created July 24, 2018 10:50
List the largest git repo objects
cd $git_dir && git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest | awk '$2 >= 2^20'
steventux / links_by_schema.rb
Created October 11, 2017 15:09
Gets all links property keys for all frontend schemas (from alphagov/govuk-content-schemas).
View links_by_schema.rb
steventux /
Created July 21, 2017 14:05
Android created Gist

Keybase proof

I hereby claim:

  • I am steventux on github.
  • I am steventux ( on keybase.
  • I have a public key ASD9SOh3M6teaR0nXLNPurnavumlBt-UXt5t7fxVHrfMowo

To claim this, I am signing this object:

steventux / technology.json
Last active August 16, 2016 15:34
Service Manual section example
View technology.json
"content_id": "c0f55d25-e6f6-4a7b-9142-0be5e07b734e",
"publishing_app": "manuals-publisher",
"rendering_app": "manuals-frontend",
"format": "manual_section",
"locale": "en",
"update_type": "major",
"base_path": "/service-manual/technology",
"public_updated_at": "2016-05-23T12:57:18Z",
"title": "Technology",
steventux / manual.json
Last active August 16, 2016 14:48
Common manual schema
View manual.json
"$schema": "",
"type": "object",
"additionalProperties": false,
"required": [
"properties": {
"body": {
"type": "string",
steventux / manual_section.json
Last active August 17, 2016 08:57
Common manual section schema
View manual_section.json
"$schema": "",
"type": "object",
"additionalProperties": false,
"required": [
"properties": {
"section_id": {
"type": "string",
View profile-travel-advice-spain-req-production-local-vm.txt
Started GET "/foreign-travel-advice/spain" for ::1 at 2016-02-24 16:35:21 +0000
Processing by TravelAdviceController#show as HTML
Parameters: {"country_slug"=>"spain"}
Rendered govuk_component/breadcrumbs (0.7ms)
Rendered govuk_component/title (1.0ms)
Rendered travel_advice/_travel_advice_navigation.html.erb (7.7ms)
Rendered govuk_component/metadata (8.9ms)
Rendered govuk_component/govspeak (0.8ms)
Rendered travel_advice/_country_summary.html.erb (54.9ms)
Rendered govuk_component/related_items (2.0ms)
View change_publishing_app_for_email_campaing_content.rb
DraftContentItem.where(publishing_app: "email-campaign-frontend").each do |content_item|
content_item.update_attributes!(publishing_app: "share-sale-publisher")
payload = Presenters::ContentStorePresenter.present(content_item)
content_store: Adapters::DraftContentStore,
base_path: content_item.base_path,
payload: payload,
View breadcrumbs-minimal-format.json
"web_url": "",
"title": "Travel abroad",
"parent": {
"web_url": "",
"title": "Passports, travel and living abroad",
"parent": null