Skip to content

Instantly share code, notes, and snippets.

export TRACKER_TOKEN=36d78e8c993f5339b39b5df310e26359
curl -X GET -H "X-TrackerToken: $TRACKER_TOKEN" "https://www.pivotaltracker.com/services/v5/projects/1275640/epics" | jq .
curl -X GET -H "X-TrackerToken: $TRACKER_TOKEN" "https://www.pivotaltracker.com/services/v5/projects/1275640/epics/3863815" | jq .
@pauldougan
pauldougan / makefake.py
Created February 6, 2018 22:21
makefake.py
#!/usr/bin/python
from faker import Faker
RECORD_COUNT=1000000
fields = ["id", "job_id", "job_row_number", "service_id", "services", "template_id", "templates_history", "template_version", "templates_history", "api_key_id", "api_keys", "key_type", "key_types", "notification_type", "created_at", "sent_at", "sent_by", "updated_at", "reference", "billable_units", "client_reference", "international", "phone_prefix", "rate_multiplier", "notification_status", "notification_status_types", "created_by_id", "users"]
fake = Faker()
print fields
for _ in range(RECORD_COUNT):
print [fake.uuid4(), fake.uuid4(), 001, fake.uuid4(), fake.uuid4(), 001, fake.uuid4(), 'ABCDEFG', 'enum', fake.iso8601(tzinfo=None, end_datetime=None), fake.iso8601(tzinfo=None, end_datetime=None), 'SENDER', fake.iso8601(tzinfo=None, end_datetime=None), 'REF', 001, 'CLIENTINFO', False, "+44", 3, 'STATUS', fake.uuid4()]
@pauldougan
pauldougan / recipe-01.md
Last active June 14, 2018 05:56
Getting details of your applications from the Cloud Foundry API

Access details of your applications from the Cloud Foundry API

Problem

You need access to application level information to help manage and plan your estate and cannot get what you need through the command line interface (CLI).

Solution

  • Login with the CF CLI as usual
  • Use the CF API to access the /V3/apps endpoint to return the detailed information in JSON format.

Lorem ipsum dolor sit amet, consectetur adipiscing elit

Problem

Curabitur sagittis ante quis vehicula aliquam. In metus odio, congue eu nulla fermentum, varius pretium arcu. Aenean egestas urna ac ipsum mollis varius. Duis eu ullamcorper purus. Etiam fermentum scelerisque hendrerit. Praesent dapibus eget elit eget ornare. Sed ultricies sed tellus nec consectetur. Pellentesque maximus orci at turpis imperdiet sollicitudin. Nulla non consectetur lectus, vitae dictum metus.

lorem ipsum

Sed finibus sapien quis rutrum cursus. Aenean ultrices non lacus at rutrum. In efficitur augue nulla, vitae lobortis nisi ornare id. Aenean tincidunt varius nunc et consequat. Duis pulvinar vitae erat pretium aliquet. Aliquam sed eros tortor. Nunc pretium quam a tellus imperdiet, vestibulum condimentum risus vulputate. Duis malesuada, urna et pulvinar ornare, libero mauris sagittis tortor, laoreet pretium odio nisi sed neque. Donec eu mi vehicula, pellentesque magna vitae, rhoncus s

Install Docker and a local Kubernetes cluster

Problem

You need Docker and Kubernetes environments for local experimentation and learning.

Solution

  • Install Docker Edge release to get access to the latest Docker and Kubernetes.
  • Start Docker and enable Kubernetes.
# make routes clickable in the mac terminal by linking them
alias cfa = 'cf a | sed -E -e "s/[^ ]+$/https:\/\/&/"'

Run a GOV.UK Prototyping Kit prototype on the GOV.UK PaaS

Prerequisites

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
brew install cf-cli git

Contact the org manager of the gds-design organisation and ask for access

Introduction

This material was collated as part of the Techops 2018/2019 Q4 Firebreak (see the Trello card for the background) and brings together some learnings about diagnosing issues with kubernetes clusters.

Table of contents