This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> 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)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[backup0.backup.provider1.production.govuk.service.gov.uk] sudo: /opt/puppet/tools/bootstrap | |
[backup0.backup.provider1.production.govuk.service.gov.uk] sudo: /opt/puppet/tools/puppet-apply --environment production | |
[backup0.backup.provider1.production.govuk.service.gov.uk] out: Warning: Could not retrieve fact fqdn | |
[backup0.backup.provider1.production.govuk.service.gov.uk] out: Warning: Host is missing hostname and/or domain: offsite-backup-1 | |
[backup0.backup.provider1.production.govuk.service.gov.uk] out: Error: Must pass graphite_disks to Class[Base::Mounts] at /opt/puppet/manifests/nodes.pp:3 on node offsite-backup-1 | |
[backup0.backup.provider1.production.govuk.service.gov.uk] out: Error: Must pass graphite_disks to Class[Base::Mounts] at /opt/puppet/manifests/nodes.pp:3 on node offsite-backup-1 | |
[backup0.backup.provider1.production.govuk.service.gov.uk] out: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/govuk_postgresql/manifests/db.pp b/modules/govuk_postgresql/manifests/db.pp | |
index ce2179b..4624170 100644 | |
--- a/modules/govuk_postgresql/manifests/db.pp | |
+++ b/modules/govuk_postgresql/manifests/db.pp | |
@@ -16,6 +16,10 @@ | |
# call to postgresql_password to enable it to be passed in to the | |
# postgresql::server::db type. | |
# | |
+# [*collectd_password*] | |
+# The plaintext password for the 'collectd' PostgreSQL user to collect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var expectedReplicaSetMembers = [ | |
{ | |
_id: 0, | |
host: 'api-mongo-1:27017' | |
}, | |
{ | |
_id: 1, | |
host: 'api-mongo-2:27017' | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git ls-tree -r --name-only HEAD | while read filename; do | |
echo "$(git log -1 --format="%ad" --date=iso -- $filename) $filename" | |
done | sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
vdcs = ['api', 'backend', 'frontend', 'management', 'redirector', 'router'] | |
providers = ['production_skyscape', 'staging_carrenza'] | |
parsed = [] | |
vdcs.each do |vdc| | |
providers.each do |provider| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl --silent http://www.tomscott.com/updates.xml | grep "10 Jul 2015" -C4 | |
<item> | |
<title>This RSS feed now includes videos from YouTube!</title> | |
<link>http://www.youtube.com/c/TomScottGo</link> | |
<description>Hope that helps.</description> | |
<pubDate>Fri, 10 Jul 2015 07:30:00 -0700</pubDate> | |
<guid isPermaLink="false">ts-1-83q94ujler</guid> | |
</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_content_security_policy | |
asset_hosts = "http://static.dev.gov.uk http://assets-origin.dev.gov.uk" | |
default_src = "default-src 'none'" | |
script_src = "script-src #{asset_hosts} http://www.google-analytics.com 'unsafe-inline'" | |
style_src = "style-src #{asset_hosts} 'unsafe-inline'" | |
img_src = "img-src #{asset_hosts}" | |
report_uri = "report-uri http://www.dev.gov.uk:8080/e" | |
csp_header = "#{default_src}; #{script_src}; #{style_src}; #{img_src}; #{report_uri}" |
NewerOlder