Skip to content

Instantly share code, notes, and snippets.

View hardyoyo's full-sized avatar
🕺
husslin'

Hardy Pottinger hardyoyo

🕺
husslin'
View GitHub Profile
@hardyoyo
hardyoyo / Vagrantfile-notify-on-sucess
Created February 12, 2015 17:25
addition to Vagrantfile which relies on https://github.com/fgrehm/vagrant-notify (forwards notify-send from the guest to the host), to notify the developer that Vagrant up has completed.
# if we're running with vagrant-notify, send a notification that we're done, in case we've wandered off
if Vagrant.has_plugin?('vagrant-notify')
config.vm.provision :shell, :inline => "notify-send --urgency=critical 'Vagrant-DSpace is up! Get back to work! :-)'", run: "always"
end
@hardyoyo
hardyoyo / install.pp
Created February 13, 2015 17:22
snippet that handles cloning DSpace from GitHub the "funky" way
### BEGIN clone of DSpace from GitHub to ~/dspace-src (this is a bit of a strange way to ckeck out, we do it this
### way to support cases where src_dir already exists)
# if the src_dir folder does not yet exist, create it
file { "${src_dir}":
ensure => "directory",
owner => "${owner}",
group => "${group}",
mode => 770,
}
@hardyoyo
hardyoyo / bash_aliases
Created February 13, 2015 20:59
.bash_aliases file to enable notifications for build success
# bash aliases for Vagrant-DSpace
alias maven="command mvn"
notified_maven() {
maven $* | \
perl -pe'$m|=/BUILD .*SUCCESS/; END {exit!$m}' && \
notify-send -u critical -i /usr/share/icons/Humanity/emblems/32/emblem-cool.png "`basename $(pwd)`: mvn $*" "Build SUCCESS" || \
notify-send -u critical -i /usr/share/icons/Humanity/emblems/32/emblem-ohno.png "`basename $(pwd)`: mvn $*" "Build FAILED"
}
notified_ant() {
@hardyoyo
hardyoyo / dsapce_3x_fresh_install_errors.txt
Created February 24, 2015 18:34
errors from a fresh install of dspace 3.x February 24, 2015
[vagrant@dspace dspace-3.4-SNAPSHOT-build (dspace-3_x)]$ ant fresh_install
Buildfile: /home/vagrant/dspace-src/dspace/target/dspace-3.4-SNAPSHOT-build/build.xml
init_installation:
init_configs:
[copy] Copying 105 files to /home/vagrant/dspace/config
[copy] Copying 1 file to /home/vagrant/dspace/config
test_database:
@hardyoyo
hardyoyo / dependency-updates.txt
Created February 25, 2015 16:04
results of mvn versions:display-dependency-updates on DSpace:master 2/25/2015
[vagrant@dspace dspace-src (master)]$ mvn versions:display-dependency-updates
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] DSpace Parent Project
[INFO] DSpace Services Framework :: API and Implementation
[INFO] DSpace Kernel :: API and Implementation
[INFO] DSpace Addon Modules
[INFO] DSpace Kernel :: Additions and Local Customizations
@hardyoyo
hardyoyo / vagrant-package-base-error.txt
Created February 27, 2015 18:29
vagrant package --base error, can't package a base box with Vagrant 1.7.2 on Ubuntu Trusty 64
vagrant package --base vagrantbox-ubuntu_dspace_1425061398748_46829 --output dspace-trusty64.box
==> vagrantbox-ubuntu_dspace_1425061398748_46829: Attempting graceful shutdown of VM...
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
vagrant@127.0.0.1's password:vagrant
vagrantbox-ubuntu_dspace_1425061398748_46829:
vagrantbox-ubuntu_dspace_1425061398748_46829: Vagrant insecure key detected. Vagrant will automatically replace
vagrantbox-ubuntu_dspace_1425061398748_46829: this with a newly generated keypair for better security.
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/keypair.rb:14:in `initialize': BN lib (OpenSSL::PKey::RSAError)
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/keypair.rb:14:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/keypair.rb:14:in `create'
@hardyoyo
hardyoyo / out-of-memory.txt
Created March 12, 2015 16:43
DS-2487: testing new ReindexSolr class, written by Andrea Schweer
[dspace@lso-dev-01 dspace]$ export JAVA_OPTS='-Xmx2048M -Xms2048M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing'
[dspace@lso-dev-01 dspace]$ bin/dspace dsrun org.dspace.util.ReindexSolr --index-name statistics
This month has 189259 documents
Exception: Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2271)
at java.lang.StringCoding.safeTrim(StringCoding.java:79)
at java.lang.StringCoding.access$300(StringCoding.java:50)
at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:305)
at java.lang.StringCoding.encode(StringCoding.java:344)
@hardyoyo
hardyoyo / beep_on_tomcat_startup.sh
Created March 19, 2015 20:13
A simple little script that beeps your terminal when Tomcat is done booting up
#!/bin/bash
# This silly command just polls for port 8080 to be available, and as soon as it is, calls beep and exits
# It is especially useful in terminals that support a visual bell, such as Terminator, or PuTTY
red='\033[0;31m'
yellow='\033[1;33m'
NC='\033[0m' # No Color
until netstat -lnt | awk '$6 == "LISTEN" && $4 ~ ".8080"'
@hardyoyo
hardyoyo / ds-2359-cocoon-stacktrace.txt
Created March 26, 2015 22:03
DS-2359: testing large file upload results in a Cocoon error
Resource not found
Go to MOspace home
org.apache.cocoon.ResourceNotFoundException: Page cannot be found
Cocoon stacktrace [hide]
Failed to process pipeline
context:/jndi:/localhost/xmlui/aspects/aspects.xmap - 96:31
<map:serialize type="xml">
context:/jndi:/localhost/xmlui/aspects/aspects.xmap - 95:55
<map:generate type="file">
context:/resource://aspects/ViewArtifacts/sitemap.xmap - 359:32
@hardyoyo
hardyoyo / dspace5.2announcement.txt
Last active August 29, 2015 14:21
DRAFT DSpace 5.2 announcement
Dear DSpace Community:
On behalf of the DSpace developers, I would like to formally announce
that DSpace 5.2 is now available. DSpace 5.2 is a bug-fix release and
contains no new features.
DSpace 5.2 can be downloaded immediately at either of the following
locations:
* SourceForge: https://sourceforge.net/projects/dspace/files/