Skip to content

Instantly share code, notes, and snippets.

View alanorth's full-sized avatar

Alan Orth alanorth

View GitHub Profile
View backup-solr.sh
#!/usr/bin/env bash
# run in batch CPU priority, with low-priority IO
rsync_command="chrt -b 0 ionice -c2 -n7 /usr/bin/rsync -av --delete"
rsync_output="start"
until [[ "$rsync_output" == "done" ]]
do
# notice the trailing slash on the rsync source argument
results_rsync=$($rsync_command /home/dspace/solr/ /home/backup/solr)
@alanorth
alanorth / solr.service
Created November 24, 2023 09:05
systemd unit for solr
View solr.service
[Unit]
Description=Solr 8.11.2
After=network.target
[Service]
Type=simple
WorkingDirectory=/var/solr
PIDFile=/var/solr/solr-8983.pid
Environment=SOLR_PID_DIR=/var/solr
@alanorth
alanorth / authentication-ldap.cfg
Created September 28, 2023 05:49
DSpace 7 authentication-ldap.cfg
View authentication-ldap.cfg
#---------------------------------------------------------------#
#------------LDAP AUTHENTICATION CONFIGURATIONS-----------------#
#---------------------------------------------------------------#
# Configuration properties used by the LDAP Authentication #
# plugin, when it is enabled. #
#---------------------------------------------------------------#
#
# If LDAP is enabled, then new users will be able to register
# by entering their username and password without being sent the
@alanorth
alanorth / dspace7_harvest_test.py
Created August 22, 2023 06:58
Test harvesting 106,000 items from the DSpace 7 REST API
View dspace7_harvest_test.py
#!/usr/bin/env python3
import signal
import requests
def signal_handler(signal, frame):
sys.exit(1)
@alanorth
alanorth / dspaces.csv
Last active October 4, 2023 16:39
List of DSpace 7 instances to serve as inspiration for those of us who have not yet managed to take the plunge
View dspaces.csv
version url
7.0 https://repository.museumsiam.org
7.0 https://minerva-access.unimelb.edu.au
7.0 https://unsworks.unsw.edu.au
7.4 https://corpus.ulaval.ca
7.5-SNAPSHOT https://dspace.alquds.edu
7.5 https://openaccess.marmara.edu.tr
7.2.1 https://oasis.col.org
7.2.1 https://open.fsc.org
7.4 https://openaccess.bezmialem.edu.tr
@alanorth
alanorth / error.log
Created May 17, 2023 10:30
Error during `test_database` step of `ant update` with DSpace 7.6-SNAPSHOT.
View error.log
$ ant update clean_backups -Doverwrite=true
Buildfile: /home/aorth/src/git/DSpace-7/dspace/target/dspace-installer/build.xml
prepare_configs:
[mkdir] Created dir: /home/aorth/src/git/DSpace-7/dspace/target/dspace-installer/config-temp
[copy] Copying 232 files to /home/aorth/src/git/DSpace-7/dspace/target/dspace-installer/config-temp
[copy] Copying 1 file to /home/aorth/src/git/DSpace-7/dspace/target/dspace-installer/config-temp
[copy] Copying 14 files to /home/aorth/src/git/DSpace-7/dspace/target/dspace-installer/config-temp
copy_configs_keep:
@alanorth
alanorth / PKGBUILD
Created May 11, 2023 12:13
Arch Linux PKGBUILD for system76-scheduler 2.0.1
View PKGBUILD
# Maintainer: Donald Carr <d _at_ chaos-reins.com>
_pkgname=system76-scheduler
pkgname=${_pkgname}
pkgver=2.0.1
pkgrel=1
pkgdesc='system76 userspace scheduler'
arch=(x86_64)
url='https://github.com/pop-os/system76-scheduler'
license=('MPL-2')
@alanorth
alanorth / PKGBUILD
Created March 30, 2023 18:46
Updated PKGBUILD for imagemagick-git
View PKGBUILD
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
# Contributor: Limao Luo <luolimao+AUR@gmail.com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# From core package
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
_pkgname='imagemagick'
pkgbase="${_pkgname}-git"
_srcdir='ImageMagick'
@alanorth
alanorth / geojson-test.py
Created March 6, 2023 12:37
Checking if GPS points are in a polygon with Shapely
View geojson-test.py
#!/usr/bin/env python
#
# Given the three points below, this code prints:
#
# $ ~/src/geojson-test.py
# True
# True
# False
#
# Requires shapely to be installed in the virtual environment.
@alanorth
alanorth / PKGBUILD
Created February 26, 2023 18:47
PKGBUILD for waybar-git, updated to match official Arch Linux waybar package
View PKGBUILD
# Maintainer: Alexis Rouillard <contact@arouillard.fr>
pkgname=waybar-git
pkgver=r2429.09142fa3
pkgrel=1
pkgdesc='Highly customizable Wayland bar for Sway and Wlroots based compositors (GIT)'
arch=('x86_64')
url="https://github.com/Alexays/Waybar/"
license=('MIT')
depends=(