I hereby claim:
- I am injms on github.
- I am injms (https://keybase.io/injms) on keybase.
- I have a public key whose fingerprint is A43B 5BD3 9A5A A760 9E3E 483B B6A8 F1FF ACB0 8ACA
To claim this, I am signing this object:
| { | |
| "engines" : { | |
| "node" : "18.4.0" | |
| }, | |
| "dependencies": { | |
| "puppeteer": "15.5.0" | |
| } | |
| } |
| const playwright = require('playwright') | |
| const Jimp = require('jimp') | |
| const enableJavaScript = true | |
| const domains = { | |
| live: 'https://www.gov.uk', | |
| preview: 'http://collections.dev.gov.uk' // Change this to your development URL | |
| } |
| require 'nokogiri' | |
| require 'open-uri' | |
| homepage = Nokogiri::HTML(URI.open('https://www.gov.uk/')) | |
| organisations = Nokogiri::HTML(URI.open('https://www.gov.uk/government/organisations/')) | |
| # Homepage selectors to find the number of ministerial departments and agencies | |
| agencies_on_homepage_selector = '[href="/government/organisations#agencies_and_other_public_bodies"] .home-numbers__large' | |
| agencies_on_organisation_page_selector = '#agencies_and_other_public_bodies + .organisations__department-count-wrapper .js-department-count' |
| { | |
| "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36", | |
| "environment": { | |
| "networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse", | |
| "hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36", | |
| "benchmarkIndex": 1302 | |
| }, | |
| "lighthouseVersion": "5.2.0", | |
| "fetchTime": "2019-10-31T11:39:13.744Z", | |
| "requestedUrl": "https://carbon-gizmo.wwf.org.uk/", |
I hereby claim:
To claim this, I am signing this object:
| let getRandomIntInclusive = (min, max) => { | |
| min = Math.ceil(min); | |
| max = Math.floor(max); | |
| return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive | |
| } | |
| let zeroise = (number, threshold) => { | |
| if (number.length === threshold) { | |
| return number; | |
| } |