Skip to content

Instantly share code, notes, and snippets.

Avatar

Alan Orth alanorth

View GitHub Profile
@alanorth
alanorth / gdal-centos7.md
Last active May 23, 2023 10:02
Install GDAL 2.4.2 on CentOS 7
View gdal-centos7.md

Install Proj

GDAL needs Proj:

$ cd /tmp
$ wget https://download.osgeo.org/proj/proj-6.1.1.tar.gz
$ tar xf proj-6.1.1.tar.gz 
$ cd proj-6.1.1
$ ./configure --prefix=/export/apps/proj/6.1.1
$ make -j4
@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')
View convert-av1.sh
#!/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
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=(
@alanorth
alanorth / iso3166-1.json
Created July 31, 2020 13:09
ISO 3166-1 JSON from iso-codes
View iso3166-1.json
{
"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
View beast-array.sbatch
#!/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
View clean-snap-sync-external.sh
#!/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)
#