Skip to content

Instantly share code, notes, and snippets.

View apetro's full-sized avatar
🏠
Working from home

Andrew Petro apetro

🏠
Working from home
View GitHub Profile
@apetro
apetro / pom.xml
Created July 25, 2011 12:48
a random working CAS maven overlay for a project with both custom Java and additions / changes to the XML files
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.someone.cas</groupId>
<artifactId>local-cas</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
@apetro
apetro / about.md
Created September 7, 2011 19:25 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@apetro
apetro / readme.md
Last active December 29, 2015 14:29
Sketch of new HRS Portlets readme

What's here

This is a multi-module Maven project.

Here's what you get:

  • hrs-portlets-api : an API!
  • hrs-portlets-webapp : a webapp! Which uses the API! But includes no implementation of the API!
  • hrs-portlets-bnsemail-impl, hrs-portlets-cypress-impl, hrs-portlets-ps-impl : implementations of the API!
  • hrs-portlets-demo-impl : a no-dependencies demo-data implementation of the API!
  • hrs-portlets-local-example: an example of what you're supposed to do to implement this locally!
@apetro
apetro / hrs-lo.fragment-layout.xml
Created December 20, 2013 02:27
fragment layout definition won't import. Dunno why. [java] ERROR [11:49.926] Failed: importing file [/home/apetro/code/github_jasig/uPortal/uportal-war/src/main/data/quickstart_entities/fragment-layout/hrs-lo.fragment-layout.xml] data-import.txt is useless FAIL,file [/home/apetro/code/github_jasig/uPortal/uportal-war/src/main/data/quickstart_ent…
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a
copy of the License at:
@apetro
apetro / list_portlets.py
Created January 7, 2014 22:39
List the titles of portlets extracted from the portlet-definition.xml files in a specified directory.
import os
import re
import sys
'''
Given the path to a directory containing uPortal portlet-definition.xml entity files, prints the title element from each.
Assumes . if target directory not specified.
Example of running:
$ python list_portlets.py /Users/apetro/code/code_doit/MUM-overlay/my-prod-overlay/entities/tags/entities-51/src/main/resources/portlet-definition
@apetro
apetro / data-import_favorite-failed.txt
Created January 9, 2014 18:42
excerpted data-import.txt log showing favorite-lo user imported, favorite-lo fragment definition imported, but fragment-lo layout did not import
<{https://source.jasig.org/schemas/uportal/io/user}user version="4.0">,23
...
SUCCESS,file [/Users/apetro/code/github_jasig/uPortal/uportal-war/src/main/data/quickstart_entities/user/favorite-lo.user.xml],12.19ms
...
<fragment-definition script="classpath://org/jasig/portal/io/import-fragment-definition_v3-1.crn">,16
SUCCESS,file [/Users/apetro/code/github_jasig/uPortal/uportal-war/src/main/data/quickstart_entities/fragment-definition/_favorite-lo.fragment-definition.xml],64.61ms
...
<fragment-layout script="classpath://org/jasig/portal/io/import-layout_v3-2.crn">,16
FAIL,file [/Users/apetro/code/github_jasig/uPortal/uportal-war/src/main/data/quickstart_entities/fragment-layout/_favorite-lo.fragment-layout.xml],10.10ms
...
@apetro
apetro / fragment-layout__favorite-lo.fragment-layout.xml.txt
Created January 9, 2014 18:43
_favorite-lo.fragment-layout exception stack trace
FAIL: fragment-layout - _favorite-lo.fragment-layout.xml
--------------------------------------------------------------------------------
java.lang.RuntimeException: Unrecognized user favorite-lo; you must import users before their layouts or set org.jasig.portal.io.layout.errorOnMissingUser to false.
at org.jasig.portal.layout.dlm.RDBMDistributedLayoutStore.importLayout(RDBMDistributedLayoutStore.java:746)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
@apetro
apetro / persistence.xml
Created January 10, 2014 19:46
MUM uportal-war.src.main.resources.META-INF.persistence.xml
<!--
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a
copy of the License at:
@apetro
apetro / list_portlet_fnames.py
Created January 15, 2014 15:49
Lists portlet fnames
import os
import re
import sys
'''
Given the path to a directory containing uPortal portlet-definition.xml entity files, prints the title element from each.
Assumes . if target directory not specified.
Example of running:
$ python list_portlets.py /Users/apetro/code/code_doit/MUM-overlay/my-prod-overlay/entities/tags/entities-51/src/main/resources/portlet-definition
@apetro
apetro / uportal_generalist_developer.md
Created January 16, 2014 20:43
Sample uPortal generalist developer job description

Sample uPortal Developer Job Description

Meta

This sample job description is light on the requirements and heavy on the desirable qualifications. The right candidate can learn the needed skills. Hire for attitude and ability to learn more so than hiring for specific skills.

Required qualifications

  • Experience collaborating with other developers using source control solutions (such as Git, Subversion, Mercurial, CVS, Perforce, etc.)
  • Experience writing SQL and using a relational database system (RDBMS).