Skip to content

Instantly share code, notes, and snippets.

View hasalex's full-sized avatar

Alexis Hassler hasalex

View GitHub Profile
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>
<!-- ..... -->
@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})"/>
@hasalex
hasalex / gist:5842614
Last active December 18, 2015 20:48
LDIF export of a OpenDJ simple content, related to gist:5842518
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-wildfly-800alpha2.sh
Last active December 18, 2015 21:59
Bash script for building WildFly AS 8.0.0 Alpha2 : bash <(curl -s https://raw.github.com/gist/5851579)
# Building WildFly AS 8.0.0.Alpha2
wget https://github.com/wildfly/wildfly/archive/8.0.0.Alpha2.tar.gz
tar -xf 8.0.0.Alpha2.tar.gz
cd wildfly-8.0.0.Alpha2
./build.sh -DskipTests -T1C -Drelease=true # -Drelease=true creates the distribution archives
# -DskipTests can be omitted but build would be much longer
# -T1C launches one build thread per processor ; it should be used only when -DskipTests is on
# Copy the binaries
cp -R build/target/wildfly-8.0.0.Alpha2 /opt/java/
@hasalex
hasalex / ldap-security-domain.cli
Created June 24, 2013 22:13
jboss-cli script for configuring LDAP configuration in WildFly with OpenDJ
batch
/subsystem=security/security-domain=swmsg-xxx:add(cache-type=default)
/subsystem=security/security-domain=swmsg-xxx/authentication=classic:add()
/subsystem=security/security-domain=swmsg-xxx/authentication=classic/login-module=LdapExtended:add(code=LdapExtended, flag=required, module-options={"java.naming.provider.url"=>"ldap://127.0.0.1:1389/","bindDN"=>"cn=Sewatech","bindCredential"=>"aa","baseCtxDN"=>"ou=people,dc=sewatech,dc=fr","baseFilter"=>"(uid={0})","rolesCtxDN"=>"ou=groups,dc=sewatech,dc=fr","roleFilter"=>"(uniqueMember={1})","roleAttributeID"=>"cn"})
run-batch
@hasalex
hasalex / gist:7430048
Created November 12, 2013 12:30
Arquillian Maven Resolver
public class Deployments {
public static final String WEBAPP_SRC = "src/main/webapp";
public static WebArchive deploy() {
File[] requiredLibraries = Maven.resolver().loadPomFromFile("pom.xml")
.resolve("com.google.guava:guava", "org.codehaus.jackson:jackson-mapper-asl")
.withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class)
.addPackages(true, JsonServlet.class.getPackage())