Skip to content

Instantly share code, notes, and snippets.

View JPrevost's full-sized avatar

Jeremy Prevost JPrevost

View GitHub Profile
/* ==UserStyle==
@name mit.primo.exlibrisgroup.com - 9/27/2023, 3:06:33 PM
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document url-prefix("https://mit-psb.primo.exlibrisgroup.com/") {
body {
font-size: 16px;
@JPrevost
JPrevost / readme.md
Last active September 25, 2023 16:40
DSpace Harvesting via OAI-PMH

Harvesting from DSpace

The best way to get data out of DSpace is use to use a protocol called OAI-PMH.

It's a rather old protocol and slightly awkward to work with, but we provide a command-line tool that wraps most of the odd bits so you can focus on just asking for the data you want.

OAI-PMH Harvester tool

MIT Libraries maintains a command-line tool that we use internally to harvest records from various sources. The tool is available publicly so you can use it too.

@JPrevost
JPrevost / index.html
Created April 30, 2020 21:26
vYNeNbO
<h1>Hello TIMDEX!</h1>
<div id="app">
<input type="text" v-model="term">
Term: {{ term }}
<div v-if="results!=null">
Hits: {{ results.hits }}
Limit: {{ results.request_count }} / {{ results.request_limit }}
<div class="results" v-for="item in results.results">

Keybase proof

I hereby claim:

  • I am jprevost on github.
  • I am jprevost (https://keybase.io/jprevost) on keybase.
  • I have a public key whose fingerprint is FBF6 56C9 97F8 2C85 12BC 2D01 50EC 4112 93B3 CA17

To claim this, I am signing this object:

@JPrevost
JPrevost / index.html
Last active January 17, 2019 18:52
timdex_docs_widdershins_slate
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>MIT Libraries Discovery API</title>
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.0
container_name: elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- cluster.name=docker-cluster
- bootstrap.memory_lock=true

Keybase proof

I hereby claim:

  • I am jprevost on github.
  • I am jprevost (https://keybase.io/jprevost) on keybase.
  • I have a public key ASD9J6bChrslJ14RkBc2ajm7_M005k2A2u5XwcmZ4PkT2wo

To claim this, I am signing this object:

@JPrevost
JPrevost / javascript_frameworks.md
Created January 29, 2016 14:27
DLAD Challenge 1

DLAD Challenge 1

battle of the javascript frameworks

Purpose:

  • To create a simple application using a javascript framework, even if it makes no sense to use one for the purpose of the demo app
@JPrevost
JPrevost / gist:929357876b3172a5d92a
Created March 20, 2015 15:16
Sum two values of a single cell, group by dates, and return 0 for dates where there are no results
SELECT year, month, sum(total) as total, sum(deliverCount) as delivered, sum(rejectCount) as rejected
FROM (
SELECT extract(year from created) AS year, extract(month from created) AS month, count(*) as total,
sum(CASE WHEN action = 'deliver' then 1 else 0 end) deliverCount,
sum(CASE WHEN action = 'discard' then 1 else 0 end) rejectCount
FROM transfer
WHERE subscriber_id = 1
AND created BETWEEN '2015-01-01 0:0' AND '2016-01-01 0:0'
GROUP BY extract(year from created), extract(month from created)