Skip to content

Instantly share code, notes, and snippets.

View aldaris's full-sized avatar

Peter Major aldaris

  • Identity Fusion
  • Bristol, United Kingdom
  • X @majorpetya
View GitHub Profile
@aldaris
aldaris / export-services.jsp
Created July 25, 2018 12:28
Export all service schemas
<%@ page language="java" import="java.security.AccessController,
java.io.FileWriter,
com.sun.identity.security.AdminTokenAction,
com.iplanet.sso.SSOToken,
com.sun.identity.sm.ServiceManager,
com.sun.identity.sm.ServiceSchemaManager,
org.apache.commons.io.IOUtils"
%>
<html>
@aldaris
aldaris / sri-report.js
Created March 4, 2018 21:59
SRI report
var observer = window.MutationObserver || window.WebKitMutationObserver;
if (observer) {
new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
mutation.addedNodes.forEach(processNode);
});
}).observe(document, { childList: true, subtree: true });
}
var processNode = function(node) {
@aldaris
aldaris / maven-error.txt
Created October 21, 2017 23:47
Maven compilation failure
---------------------------------------------------
constituent[0]: file:/usr/local/apache-maven-3.5.0/conf/logging/
constituent[1]: file:/usr/local/apache-maven-3.5.0/lib/jansi-1.13.jar
constituent[2]: file:/usr/local/apache-maven-3.5.0/lib/maven-slf4j-provider-3.5.0.jar
constituent[3]: file:/usr/local/apache-maven-3.5.0/lib/maven-resolver-spi-1.0.3.jar
constituent[4]: file:/usr/local/apache-maven-3.5.0/lib/slf4j-api-1.7.22.jar
constituent[5]: file:/usr/local/apache-maven-3.5.0/lib/maven-artifact-3.5.0.jar
constituent[6]: file:/usr/local/apache-maven-3.5.0/lib/aopalliance-1.0.jar
constituent[7]: file:/usr/local/apache-maven-3.5.0/lib/maven-resolver-provider-3.5.0.jar
constituent[8]: file:/usr/local/apache-maven-3.5.0/lib/plexus-interpolation-1.24.jar
@aldaris
aldaris / Java9.java
Created October 19, 2017 11:06
Java 9 compilation error
public class Java9 {
public static void main(String[] args) throws Exception {
hello("foo", () -> doSomething("bad Java9", "test"));
}
public static <E extends Exception> void hello(String text, Foo<E> foo) throws Exception {
foo.run();
}
@aldaris
aldaris / vim-tips
Last active April 19, 2017 21:42
vim tips
b - back a word
w - go to next word
e - go to the end of the current word
d - delete
y - copy
0 - go to the beginning of line
$ - go to the end of the line
o - insert new line and turn on editor mode
a - editor mode and move cursor one character (append)
i - editor mode and leave cursor at location (insert)
@aldaris
aldaris / buildAM13.sh
Created April 4, 2017 08:05
Shell script to build OpenAM 13.0.0 from openam-public repository
#!/bin/bash
#Run buildDJ3.sh script first in the same folder from: https://gist.github.com/aldaris/fe234d76f3940c42ae9bb5aa69b8e98e
function build() {
mvn clean install
if [ $? -ne 0 ] ; then
exit 1;
fi
}
@aldaris
aldaris / buildDJ3.sh
Created March 31, 2017 18:43
Shell script to build OpenDJ 3.0.0 from opendj-public repository
#!/bin/bash
function build() {
mvn clean install
if [ $? -ne 0 ] ; then
exit 1;
fi
}
mkdir commons
* modify the Session object so that it tracks when it was last refreshed and when one asks for timeleft/etc fields, it would take that time difference into account instead of forcing people to refresh sessions even during cache period.
* make XUI CSP friendly
* change push authentication to display a code in both browser and app to allow end-users correlate authentication requests
* Write credential storage system a'la Jenkins
* Come up with a special token/name that can be used in SAML and OAuth2/OIDC settings that maps to the user's group/role/filteredrole memberships (retrieved via idrepo APIs)
* Move openam-auth-securid to an external project as an extension
* Create LDAPConnectionFactoryBuilder
* Update @UpgradeStepInfo (or create a new annotation even for service helpers) to contain metadata about which version the step is necessary for - get rid of legacy upgrade steps.
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
@aldaris
aldaris / jbossadmin
Created October 28, 2014 11:12
Making WildFly a little bit more usable
#!/bin/bash
WILDFLY_HOME=/Users/aldaris/wildfly-8.1.0.Final
CONNECT_EXCEPTION=ConnectException
RUNNING=running
function usage {
echo "Usage: jbossadmin start|stop|restart [<counter>]"
echo "If <counter> is absent, 1 is assumed"
exit -1