Skip to content

Instantly share code, notes, and snippets.

View hasalex's full-sized avatar

Alexis Hassler hasalex

View GitHub Profile
@hasalex
hasalex / ldif-for-tomcat7
Last active August 29, 2015 14:01
LDAP Realm for Tomcat 7 (works towod OpenDJ)
dn: dc=sewatech,dc=fr
objectClass: domain
objectClass: top
dc: sewatech
dn: ou=people,dc=sewatech,dc=fr
objectClass: organizationalUnit
objectClass: top
ou: people
@hasalex
hasalex / build-eap-6.2.4.sh
Created June 29, 2014 18:11
Build JBoss EAP 6.2.4 from source
wget ftp://ftp.redhat.com/redhat/jbeap/6.2.4/en/source/jboss-eap-6.2.4-src.zip
wget http://maven.repository.redhat.com/techpreview/eap6/6.2.4/jboss-eap-6.2.4-full-maven-repository.zip
wget https://raw.githubusercontent.com/hasalex/eap-build/master/src/settings.xml
unzip jboss-eap-6.2.4-src.zip
unzip jboss-eap-6.2.4-full-maven-repository.zip
cp settings.xml jboss-eap-6.2-src/tools/maven/conf/
cd jboss-eap-6.2-src/
@hasalex
hasalex / keybase.md
Created December 7, 2014 20:44
keybase.io

Keybase proof

I hereby claim:

  • I am hasalex on github.
  • I am hasalex (https://keybase.io/hasalex) on keybase.
  • I have a public key whose fingerprint is A9B5 8997 A29D D848 8D7A 2142 A50C 0255 D630 758D

To claim this, I am signing this object:

10 Capital et réserves
101 Capital
104 Primes liées au capital social
105 Ecarts de réévaluation
106 Réserves
107 Ecart d'équivalence
108 Compte de l'exploitant
109 Actionnaires : capital souscrit - non appelé
11 Report à nouveau (solde créditeur ou débiteur)
110 Report à nouveau (solde créditeur)
@hasalex
hasalex / gist:1225225
Created September 18, 2011 16:14
JBossAS 7 config
<!-- AS 7 -->
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
<deployment-scanner scan-interval="5000"
relative-to="jboss.server.base.dir"
path="deployments" />
</subsystem>
<!-- ..... -->
# Building WildFly AS 9
version=9.0.2.Final
# Download and prepare the source code
wget https://github.com/wildfly/wildfly/tarball/$version
tar -xvf $version
cd wildfly-*
# Build it !
./build.sh -DskipTests -Dskip-enforce -T1C
@hasalex
hasalex / CustomInjectionProvider.java
Created January 31, 2013 06:28
Custom InjectionProvider that injects EJBs in JSF 1.2 managed beans. Helpful on my JBoss AS 7.1.3 where JSF 1.2 isn't fully integrated.
public class CustomInjectionProvider implements InjectionProvider {
public static final String ROOT_NAME = "java:app/TestJbossEJB-0.0.1-SNAPSHOT/";
public void inject(Object o) throws InjectionProviderException {
Field[] fields = o.getClass().getDeclaredFields();
try {
for (Field field : fields) {
if (field.getAnnotation(EJB.class) != null) {
field.setAccessible(true);
field.set(o, getBean(field.getType()));
# Building JBoss AS 7.2.0.Final
wget https://github.com/jbossas/jboss-as/archive/7.2.0.Final.tar.gz
tar -xvf 7.2.0.Final.tar.gz
cd jboss-as-7.2.0.Final
./build.sh -DskipTests -Drelease=true # -Drelease=true creates the distribution archives
# Copy the binaries
cp -R build/target/jboss-as-7.2.0.Final /opt/java/
# Copy the archive
cp dist/target/jboss-as-7.2.0.Final.zip ~/archives/
@hasalex
hasalex / gist:5625603
Last active December 17, 2015 14:39
Bash script for building WildFly AS 8.0.0 Alpha1
# Building WildFly AS 8.0.0.Alpha1
wget https://github.com/wildfly/wildfly/archive/8.0.0.Alpha1.tar.gz
tar -xvf 8.0.0.Alpha1.tar.gz
cd wildfly-8.0.0.Alpha1
./build.sh -DskipTests -Drelease=true # -Drelease=true creates the distribution archives
# -DskipTests can be omitted but build would be much longer
# Copy the binaries
cp -R build/target/wildfly-8.0.0.Alpha1 /opt/java/
# Copy the archive
@hasalex
hasalex / gist:5842518
Last active December 18, 2015 20:48
LDAP security domain in WildFly 8 with OpenDJ Works in JBoss AS 7, as well
<security-domain name="swmsg-ldap" cache-type="default">
<authentication>
<login-module code="LdapExtended" flag="required">
<module-option name="java.naming.provider.url" value="ldap://127.0.0.1:1389/"/>
<module-option name="bindDN" value="cn=Sewatech"/>
<module-option name="bindCredential" value="aa"/>
<module-option name="baseCtxDN" value="ou=people,dc=sewatech,dc=fr"/>
<module-option name="baseFilter" value="(uid={0})"/>
<module-option name="rolesCtxDN" value="ou=groups,dc=sewatech,dc=fr"/>
<module-option name="roleFilter" value="(uniqueMember={1})"/>