Skip to content

Instantly share code, notes, and snippets.

Avatar
👹
Ducking and diving

Daniel Pett portableant

👹
Ducking and diving
View GitHub Profile
@portableant
portableant / objects.json
Last active Jul 6, 2022
A response from the Fitzwilliam Museum Collections API
View objects.json
{
"data": [
{
"summary": [
{
"term": "term-117732",
"URI": "https://data.fitzmuseum.cam.ac.uk/id/terminology/term-117732",
"apiURI": "https://data.fitzmuseum.cam.ac.uk/api/v1/terminology/term-117732",
"summary_title": ""3-Swami" Pagoda"
}
@portableant
portableant / README.md
Last active May 28, 2022
Download data
View README.md

Scraping data from ESRI Arcview maps/ extract images from Web resources

NOTE - The rscripts are not optimised, they were just created to prove this can be done

Problem to solve - extract all the records from a webmap on Historic England's website for aerial photography and create a CSV file. This relates to a section 21 refusal of a FOIA request by Andy Mabbett: https://www.whatdotheyknow.com/request/847052/response/2037681/attach/html/4/Mr%20Mabbett%20FOI.docx.html

He has uploaded an example image to wikicommons here: https://commons.wikimedia.org/wiki/File:Historic_England_Aerial_Photo_Explorer_-_raf_540_78_sffo_0003_-_screenshot_-_01.png

@portableant
portableant / upgradeInstuctions.md
Last active May 10, 2022
How to upgrade SOLR instance from 8.3 to 8.11.1
View upgradeInstuctions.md

How to upgrade SOLR instance from 8.3 to 8.11.1

This is how I got the SOLR upgrade process to run. There was nothing else to run!

Steps

To upgrade I did the following:

  1. Backup your data
  2. Stop the solr service
  3. Download the latest version
View gist:0608119edcdc0a239acb6cd960931b4d
<a href="https://tickets.museums.cam.ac.uk/account/create" title="Sign up for enews" class="btn btn-info d-block">Tickets coming soon, sign up to our eNews for more information.</a>
View gist:463c24d00e46493f2e964b616e9dff51
<!--tag buttons style-->
<style>
.btn-tag {
margin-bottom: 5px;
text-transform: capitalize;
}
.btn-tag.connections {
background-color: rgba(255, 255, 157, 0.5);
}
View gist:a57a7699300e3add60b31d18698e4157
<div class="col-12 shadow-sm p-3 mx-auto mb-3 ">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" title="A YouTube video from the Fitzwilliam Museum"
src="https://www.youtube.com/embed/{{page.video_id}}" frameborder="0"
allowfullscreen></iframe>
</div>
</div>
View subs.txt
متحف فيتزويليام، كامبريدج
00:03
بورتريهات مومياوات العصر الروماني
00:05
تقنيات الرسم والتلوين
00:08
انا د.لوسي رابسون
00:10
متخصصة في ترميم اللوحات بمعهد
00:12
@portableant
portableant / fitz.json
Created May 19, 2021
Fitzwilliam Museum boundary
View fitz.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@portableant
portableant / code.js
Created May 18, 2021
Google action script for parsing sheets data to docs template replacements
View code.js
function createDocument() {
// Get the headers from a sheet with the sheet id number
var headers = Sheets.Spreadsheets.Values.get('1-3du2O3thRu4Ynj_6ShC0tajxjXOiAufA68Uq_z_F6M', 'A1:AU1');
// Define the area from which to pull data. Assume 200 rows
var starters = Sheets.Spreadsheets.Values.get('1-3du2O3thRu4Ynj_6ShC0tajxjXOiAufA68Uq_z_F6M', 'A2:AU200');
// Define your google document template id number
var templateId = '1tSMgb6m7IfbhSdAeGx2tqYS5fDG5uRyFBVEfmhPUDDA';
for(var i = 0; i < starters.values.length; i++){
console.log(starters.values[i])
@portableant
portableant / Error.md
Created Apr 12, 2021
Jekyll bundle fail - OSX Big Sur Ruby 3.0.0
View Error.md

Error

bundle exec jekyll serve Configuration file: /Users/danielpett/Documents/githubProjects/steppe-gold/_config.yml Source: /Users/danielpett/Documents/githubProjects/steppe-gold Destination: /Users/danielpett/Documents/githubProjects/steppe-gold/_site Incremental build: disabled. Enable with --incremental Generating... Jekyll Feed: Generating feed for posts done in 0.462 seconds.