Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
<title>russell davies</title>
<link rel="alternate" type="text/html" href="http://russelldavies.typepad.com/planning/"/>
<id>tag:typepad.com,2003:weblog-5918</id>
<updated>2014-01-19T18:32:36+00:00</updated>
<subtitle>"Extreme and sustained amiable weirdness"
about | flickr | pinboard | feed | archive</subtitle>
@alexmuller
alexmuller / hex_md5.js
Last active June 17, 2022 18:48
Display Gravatar when user has finished typing their email address
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/*
>>> range(5)
[0, 1, 2, 3, 4]
>>> sum(range(5))
10
>>> def is_even(x):
... return x % 2 == 0
...
>>> [x for x in range(5) if is_even(x)]
[0, 2, 4]
>>> sum([x for x in range(5) if is_even(x)])
GDS::SSO.config do |config|
config.user_model = "User"
config.oauth_id = ENV['SIGNON_OAUTH_ID']
config.oauth_secret = ENV['SIGNON_OAUTH_SECRET']
config.oauth_root_url = Plek.current.find("signon")
end
```
backend-lb in /etc/nginx/sites-enabled/specialist-publisher.integration.publishing.service.gov.uk
```
location /cma-cases {
proxy_set_header Host specialist-publisher-rebuild.integration.publishing.service.gov.uk;
proxy_pass https://specialist-publisher-upstream;
}
[
{
"userName": "alphagov",
"repo": "backdrop"
},
{
"userName": "alphagov",
"repo": "backdrop-collector"
},
{
#!/usr/bin/env ruby
# Output:
# TSV
# hits_date.tsv
# date, count, status, host, path
dates = [
"2013-10-19",
"2013-10-20",
@alexmuller
alexmuller / gist:7025455
Created October 17, 2013 14:02
Sensu check
/etc/sensu/community-plugins/plugins/graphite/check-data.rb -s graphite -u username -p password -t \"sumSeries\(stats.nginx.frontend-app-1_localdomain.spotlight_perfplat_dev.http_5*\)\" -w \"~:0\" -c \"~:0\" -n \"5xx_rate_spotlight.perfplat.dev\"
[
{
"userName": "alphagov",
"repo": "backdrop"
},
{
"userName": "alphagov",
"repo": "backdrop-collector"
},
{
Hook: campfire
alphagov/backdrop-pingdom-collector: Not setup
alphagov/backdrop-ga-realtime-collector: Yep (govuk#Zeitgeist, [redactedtoken])
alphagov/backdropsend: Yep (govuk#Zeitgeist, [redactedtoken])
alphagov/limelight: Yep (govuk#Zeitgeist, [redactedtoken])
alphagov/libretto: Not setup
alphagov/backdrop-ga-collector: Yep (govuk#Zeitgeist, [redactedtoken])
alphagov/backdrop-ga-collector-private: Not setup
alphagov/backdrop-collector: Not setup
alphagov/backdrop-google-spreadsheet-collector: Yep (govuk#Zeitgeist, [redactedtoken])