Skip to content

Instantly share code, notes, and snippets.

Earle Nietzel ern

Block or report user

Report or block ern

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View git-changed-paths.sh
#!/bin/bash
##############################################################################
# This script output what paths have changed using a SHA Range
#
# Example usage:
#
# Author: Earle Nietzel
# Date: 8/21/2019
# License: http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
##############################################################################
@ern
ern / clean-code.sh
Created Apr 1, 2019
Sakai Tomcat Scripts
View clean-code.sh
#!/usr/local/bin/zsh
source bin/common.sh
if [ -n "$(ls -A $COMPONENTS)" ]; then
echo "Removing $COMPONENTS"
rm -rf $COMPONENTS/*
fi
if [ -n "$(ls -A $LIB)" ]; then
View gist:34e44b9933a3ff6f31088a91a578ae9f
private void traceSimulateDelay(long delay) {
// log the caller
String thisClassName = this.getClass().getName();
StackTraceElement[] ste = Thread.currentThread().getStackTrace();
StringBuilder callee = new StringBuilder("PERFORMANCE[-{}] called by ");
for (int i = 2; i <= ste.length; i++) {
// 0 is Thread.getStackTrace()
// 1 is this method
String className = ste[i].getClassName();
String shortClassName = className.substring(className.lastIndexOf(".") + 1);
@ern
ern / cron.html
Last active Jun 17, 2016
Cron Triggers
View cron.html
<h1>CronTrigger Tutorial</h1>
<h2>Introduction</h2>
<p><tt>cron</tt> is a UNIX tool that has been around for a long time, so its scheduling capabilities are powerful
and proven. The <tt>CronTrigger</tt> class is based on the scheduling capabilities of cron.</p>
<p><tt>CronTrigger</tt> uses “cron expressions”, which are able to create firing schedules such as: “At 8:00am every
Monday through Friday” or “At 1:30am every last Friday of the month”.</p>
@ern
ern / catalina.out
Created Apr 13, 2016
Normalized Sakai logging
View catalina.out
Listening for transport dt_socket at address: 8000
13-Apr-2016 11:20:44.772 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.20
13-Apr-2016 11:20:44.773 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 15 2015 18:10:42 UTC
13-Apr-2016 11:20:44.773 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.20.0
13-Apr-2016 11:20:44.773 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Mac OS X
13-Apr-2016 11:20:44.773 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.11.4
13-Apr-2016 11:20:44.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86_64
13-Apr-2016 11:20:44.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre
13-Apr-2016 11:20:44.774 INF
@ern
ern / SakaiSessionEstimator
Created Apr 6, 2016
Estimates the size of attributes in the session
View SakaiSessionEstimator
diff --git a/kernel/kernel-impl/pom.xml b/kernel/kernel-impl/pom.xml
index f5e5a64..b0b1d65 100644
--- a/kernel/kernel-impl/pom.xml
+++ b/kernel/kernel-impl/pom.xml
@@ -312,6 +312,11 @@
<scope>compile</scope>
</dependency>
-->
+ <dependency>
+ <groupId>com.carrotsearch</groupId>
View sakaiSiteHideResources.sh
#!/bin/sh
exec scala "$0" "$@"
!#
import scala.xml.{Elem,XML}
class SoapClient {
private def error(msg: String) = {
println("SoapClient error: " + msg)
}
@ern
ern / pom.xml
Created Sep 14, 2015
Sakai RPM
View pom.xml
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>master</artifactId>
<groupId>org.sakaiproject</groupId>
<version>10.4</version>
<relativePath>master/pom.xml</relativePath>
</parent>
View gist:44250085ed2b9f49566b
2015-09-11 09:42:00,009 WARN http-nio-8080-exec-18 org.apache.cxf.phase.PhaseInterceptorChain - Application {http://webservices.sakaiproject.org/}SakaiScriptService#{http://webservices.sakaiproject.org/}
getPlacementId has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: ToolConfiguration not found
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:213)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178)
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:68)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
View WS stack
2015-09-10 15:42:50,169 WARN http-nio-8080-exec-8 org.apache.cxf.phase.PhaseInterceptorChain - Application {http://webservices.sakaiproject.org/}SakaiLoginService#{http://webservices.sakaiproject.org/}lo
gin has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unable to login
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:213)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178)
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:68)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
You can’t perform that action at this time.