Skip to content

Instantly share code, notes, and snippets.

View DonRichards's full-sized avatar

Don Richards DonRichards

View GitHub Profile
@DonRichards
DonRichards / README.md
Last active July 15, 2022 18:06 — forked from seth-shaw-unlv/generate-image-derivatives.php
Islandora script for triggering new derivatives (DRAFT)

How to run this script

git clone https://gist.github.com/DonRichards/cc6025eced330c325b4af96a15bf2cb4 check_derivatives
cd check_derivatives
drush --root=/var/www/drupal scr $(pwd)/check_derivatives/generate-image-derivatives.php

# OR just the single file
curl -O https://gist.githubusercontent.com/DonRichards/cc6025eced330c325b4af96a15bf2cb4/raw/generate-image-derivatives.php
@DonRichards
DonRichards / README.md
Last active March 28, 2022 19:49 — forked from mark-cooper/ascli
Load ArchivesSpace backend in a pry session

Useful Notes for developers

When starting run the below script then

 ./build/run backend:devserver  <-- 1st, Must be ran first and wait for this messsage
       ...
       [java] Mizuno 9.4.44 (Jetty 9.4.44.v20210927) listening on 0.0.0.0:4567

 ./build/run frontend:devserver <-- 2nd No need to wait to run the next
 ./build/run public:devserver   <-- 3rd No need to wait to run the next
 ./build/run indexer &lt;-- 4th
@DonRichards
DonRichards / gist:653cadc9b34b57b86bc0a762516ce9f5
Created February 24, 2021 18:30 — forked from frob/gist:66f13be5b8789ed8a61c2c1083fd51d6
Setting up Annotator.js annotation on Drupal

Annotator.js works on Drupal as two modules and a library (installed, as usual, under /sites/all):

    /modules/annotator
    /modules/annotation
    /libraries/annotator

The files in libraries/annotator are the latest from the Annotator.js repo (https://github.com/openannotation/annotator/releases). Although the modules Infinite Ulysses uses have been significantly changed from the modules you could download on Drupal.org, the Drupal.org Annotator (https://www.drupal.org/project/annotator) and Annotation (https://www.drupal.org/project/annotation) modules pages might still have useful info if you're troubleshooting.

@DonRichards
DonRichards / fix.sh
Created April 14, 2020 18:55 — forked from tkhduracell/fix.sh
Fix locale on raspberry pi (raspbian) "Setting locale failed."
#
# How to get rid of the locale warning on raspberry pi
#
sudo sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" -i /etc/locale.gen
sudo locale-gen en_US.UTF-8
sudo update-locale en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
@DonRichards
DonRichards / expand_disk.py
Last active February 4, 2020 16:07 — forked from ogero/expand_disk.py
Python script to expand VirtualBox VMDK disk (created to expand vagrant boxes using VB provider) for Islandora 8 VM
import subprocess,re,os,random,string,sys,fileinput
from sys import platform as _platform
from time import sleep
# VirtualBox disk resize tool is forked from
# Author: Geronimo Onativia (geronimox@gmail.com)
# Some ideas taken from
# https://github.com/mitchellh/vagrant/issues/2339#issuecomment-230839878
# http://stackoverflow.com/a/31177761/13116
@DonRichards
DonRichards / pr_etiquette.md
Created October 20, 2017 16:47 — forked from mikepea/pr_etiquette.md
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@DonRichards
DonRichards / php-code-inspection.md
Created June 22, 2017 13:25
How to install PHP code inspection tools using homebrew-php and how to integrate with JetBrain's IntelliJ or PhpStorm

#Inspection Tools with homebrew-php#

##Prerequisites##

  • Homebrew is installed

##Step 1: Installing homebrew-php##

  1. brew tap homebrew/dupes
  2. brew tap josegonzalez/homebrew-php
  3. brew install PHP53 (or other version of your choice)
@DonRichards
DonRichards / starcounter.js
Created May 3, 2017 19:19 — forked from yyx990803/starcounter.js
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@DonRichards
DonRichards / clockworkmod-galaxy-tab-10.1-p7510-heimdall
Created March 23, 2017 20:04 — forked from pskiden/clockworkmod-galaxy-tab-10.1-p7510-heimdall
Flash Galaxy Tab 10.1 p7510 wifi with Heimdall on OSX
Didn't find any instructions on how to get ClockworkMod onto my Galaxy Tab 10.1 p7510 (wifi only) which already had ICS. Seemed like the old option to boot an update.zip from the root dir was removed when I updated from Honeycomb. So I used Heimdall to flash it with the latest ClockworkMod.
1. Download latest heimdall from: http://www.glassechidna.com.au/products/heimdall/
I used 1.4.0 for Mac OSX. The install script will add it to PATH so you can use it from anywhere in the terminal.
2. Download latest ClockworkMod from: http://www.clockworkmod.com/rommanager
Scroll down to "Samsung Galaxy Tab 10.1 (Wifi)" and get the recovery image. Nevermind the touch recovery.
#!/bin/bash
# Converts an image in a multi-resolution favicon
# Requires Imagemagick
#
# @link https://gist.github.com/lavoiesl/a7ccb4affe869d0a0bca
if [[ "$#" != "2" ]]; then
echo "Usage: $0 input.png output.ico" >&2
exit 1
fi