Skip to content

Instantly share code, notes, and snippets.

@gmazzap
gmazzap / Controller.php
Last active April 22, 2024 12:08
WordPress plugin to ease the creation of virtual pages.
<?php
namespace GM\VirtualPages;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @license http://opensource.org/licenses/MIT MIT
*/
class Controller implements ControllerInterface {
private $pages;
@alanorth
alanorth / move_collections.sh
Last active August 30, 2023 06:31
Move DSpace collection(s) from one community to another. DSpace doesn't have a built-in tool to do this, so you have to use raw SQL commands.
#!/usr/bin/env bash
#
# Moves DSpace collections from one community to another. Takes a list of
# handles, then resolves their internal resource_id's and reassigns the
# community relationship. Assumed to be running as `postgres` Linux user.
#
# I don't think reindexing is required, because no metadata has changed,
# and therefore no search or browse indexes need to be updated. You might
# need to clear the Cocoon cache to see the updated breadcrumb trails.
#