Skip to content

Instantly share code, notes, and snippets.

GET /healthcheck

{
  "checks": [
    "sidekiq_latency",
    ...,
    "content_changes"
  ]
}
//
// ColouredCard.swift
// Abtastic
//
// Created by Thomas Leese on 12/10/2018.
// Copyright © 2018 Orycion. All rights reserved.
//
import UIKit
SELECT *,
COUNT(*) OVER () AS total
FROM
(SELECT DISTINCT ON(editions.document_id) editions.document_id,
"editions"."analytics_identifier",
editions.base_path AS base_path,
"editions"."content_store",
"editions"."description",
"editions"."details",
"editions"."document_type",
SELECT *,
COUNT(*) OVER () AS total
FROM
(SELECT DISTINCT ON(editions.document_id) editions.document_id,
"editions"."analytics_identifier",
editions.base_path AS base_path,
"editions"."content_store",
"editions"."description",
"editions"."details",
"editions"."document_type",
n = I18n.available_locales.length
threads = []
1000.times do |i|
loc = I18n.available_locales[i % n]
threads << Thread.new do
sleep rand(0.1...1.0)
I18n.with_locale(loc) do
sleep rand(0.1...1.0)
puts "#{loc} #{I18n.locale} #{I18n.t 'document.type.announcement.one'}"
Govbot Alpha
Do any of the following apply? (you might get extra funding.)
1. You’ve got children under 17
2. An adult depends on you financially
3. You have a disability, health condition or learning difficulty, eg dyslexia
4. You’re on low income, eg you find it hard to pay for basics like food and accommodation
module LinkChecker::UriChecker
class UriCheckerError < Error
def initialize(options = {})
super(suggested_fix: :check_correct_manually, options)
end
end
class UriCheckerWarning < Warning
def initialize(options = {})
super(suggested_fix: :check_correct_manually, options)
swagger: '2.0'
info:
version: 0.1.0
title: GOV.UK Content API
description: An API for accessing the content available on GOV.UK.
schemes:
- https
host: gov.uk
type Path {
path: String!
resource: Resource!
}
union Resource = Document | Redirect | Gone
enum SchemaName {
...
}
def wrap_function(function):
def wrapper(*args, **kwargs):
print("name", function.__name__)
print("args", args)
print("kwargs", kwargs)
return function(*args, **kwargs)
return wrapper
def wrap_class(cls):