Skip to content

Instantly share code, notes, and snippets.

View alanorth's full-sized avatar

Alan Orth alanorth

View GitHub Profile
@alanorth
alanorth / dspace7_harvest_test.py
Created August 22, 2023 06:58
Test harvesting 106,000 items from the DSpace 7 REST API
#!/usr/bin/env python3
import signal
import requests
def signal_handler(signal, frame):
sys.exit(1)
@alanorth
alanorth / emoji.php
Created June 4, 2014 19:32
Emoji class / function / variable names in PHP...
<?php
class 💩💩💩💩
{
function 💩💩💩($😎, $🐯)
{
return $😎 + $🐯;
}
}
$🐔 = 3;
@alanorth
alanorth / error.log
Created May 17, 2023 10:30
Error during `test_database` step of `ant update` with DSpace 7.6-SNAPSHOT.
$ 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
# 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')
#!/usr/bin/env bash
#
# v2021-04-29
#
# I run it like this (using zsh syntax):
#
# $ for video (~/Pictures/2021/**/*.mp4(ND.)); do ~/Downloads/av1-tests/convert-av1.sh "$video"; done
#
# Reference:
# - https://ffmpeg.org/ffmpeg-codecs.html#libaom_002dav1
@alanorth
alanorth / PKGBUILD
Created March 30, 2023 18:46
Updated PKGBUILD for imagemagick-git
# 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 / PKGBUILD
Created February 26, 2023 18:47
PKGBUILD for waybar-git, updated to match official Arch Linux waybar package
# 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=(
@alanorth
alanorth / iso3166-1.json
Created July 31, 2020 13:09
ISO 3166-1 JSON from iso-codes
{
"3166-1": [
{
"alpha_2": "AW",
"alpha_3": "ABW",
"name": "Aruba",
"numeric": "533"
},
{
"alpha_2": "AF",
@alanorth
alanorth / beast-array.sbatch
Created January 31, 2023 08:34
Example of SLURM array job for Everlyn
#!/usr/bin/bash -l
#SBATCH -p batch
#SBATCH -n 8
#SBATCH -J prank
# Start a job array with eight CPUs total where we iterate over 1,000+ FASTA
# files and start a prank command for each one. SLURM ensures that there are
# no more than eight running at the same time within the same allocation.
#
# See: https://support.ceci-hpc.be/doc/_contents/QuickStart/SubmittingJobs/SlurmTutorial.html#packed-jobs-example
@alanorth
alanorth / clean-snap-sync-external.sh
Last active January 3, 2023 14:24
Clean snapshots created by snap-sync
#!/usr/bin/env bash
#
# clean-snap-sync-external.sh v1.0.1 (2021-07-09)
#
# Changes
# -------
# 2021-07-09:
# - adjust logic to keep latest x, instead of delete oldest x
# - make output cleaner (hide btrfs subvolume delete output)
#