Skip to content

Instantly share code, notes, and snippets.

View mwoodiupui's full-sized avatar

Mark H. Wood mwoodiupui

View GitHub Profile
@mwoodiupui
mwoodiupui / gist:715aa2696da6086c92b26e1c49421b2f
Created April 9, 2025 18:58
Some Highly Opinionated Notes on Java Commentary
Some Higly Opinionated Notes on Java Commentary
Package Javadoc (package-info.java):
- Do this. Help us understand how the classes in this package are
related and where we should start in trying to learn them.
- Explain why these classes are packaged together.
Class/interface Javadoc:
- Omit "this class" etc. We know it's a class.
- Classes and interfaces do not do things; they represent things.
@mwoodiupui
mwoodiupui / App.java
Last active September 3, 2024 18:10
Augmenting a URL's path using URIBuilder
package net.wood;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.Objects;
import java.util.List;
import org.apache.http.client.utils.URIBuilder;
##
## Example config file for the Clam AV daemon
## Please read the clamd.conf(5) manual before editing this file.
##
# Comment or remove the line below.
# Example
# Uncomment this option to enable logging.
@mwoodiupui
mwoodiupui / RecycleTest.java
Created January 23, 2015 16:22
Quickie to test DatabaseMetaData.getTables with Oracle (for recycle bin behavior)
import java.sql.*;
class Recycletest
{
private static final String URL
= "jdbc:oracle:thin:@changeit:1521/XE";
private static final String USER = "changeit";
private static final String PWD = "changeit";
public static void main(String[] argv)
@mwoodiupui
mwoodiupui / dsctx
Last active August 29, 2015 14:05
Shell script to create customized Tomcat Context descriptors for a DSpace instance
#! /bin/sh
# Copyright 2014 Indiana University
# Mark H. Wood, IUPUI University Library
### Configure me!
DSHOME="${HOME}/dspaces"
DBMS='postgresql'
DB_HOST=localhost
@mwoodiupui
mwoodiupui / dsenv
Last active August 29, 2015 14:05
Shell script to create a customized build.properties for DSpace
#! /bin/sh
# Copyright 2014 Indiana University
# Mark H. Wood, IUPUI University Library
### Configure me!
DS_HOST=${DSENV_HOST:-`hostname -f`}
DS_PORT=${DSENV_PORT:-8080}
DS_HOME="${HOME}/dspaces" # MAGIC
[email protected] # MAGIC
@mwoodiupui
mwoodiupui / filldspace.sh
Created November 6, 2013 17:57
Untested script to load a set of AIPs from a configured directory, if they are there.
#! /bin/sh
WHO="ferd@berfel"
CONTENT="~/content"
DSPACE_HOME="~/dspace"
SITE=`echo ${CONTENT}/SITE@* | cut -f1 -d' '`
if [ -n "${SITE}" ]
then
echo ${DSPACE_HOME}/bin/dspace packager \