This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Tomcat auto-start | |
| # | |
| # description: Auto-starts tomcat | |
| # processname: tomcat | |
| # pidfile: /var/run/tomcat.pid | |
| #export JAVA_HOME=/usr/lib/jvm/java-6-openjdk | |
| # Retrouver le répertoire d'installation de Java | |
| export JAVA_HOME=`update-java-alternatives -l | grep java-6-openjdk | awk '{ print $3 }'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- Create schema university | |
| -- | |
| CREATE DATABASE IF NOT EXISTS university; | |
| USE university; | |
| CREATE TABLE `university`.`course` ( | |
| `id` int(11) NOT NULL auto_increment, | |
| `code` varchar(10) NOT NULL, | |
| `name` varchar(30) NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Commun pour le connecteur APR et les connecteurs classiques | |
| openssl req -newkey 2048 -nodes -keyout conf/tomcat.key -x509 -days 365 -out conf/tomcat.crt -config conf/openssl.cnf | |
| # Inutile pour le connecteur APR | |
| openssl pkcs12 -inkey conf/tomcat.key -in conf/tomcat.crt -export -out conf/tomcat.pfx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fr.sewatech.demo.http2.undertow; | |
| import io.undertow.Undertow; | |
| import io.undertow.UndertowOptions; | |
| import io.undertow.server.HttpServerExchange; | |
| import io.undertow.util.Headers; | |
| import javax.net.ssl.KeyManagerFactory; | |
| import javax.net.ssl.SSLContext; | |
| import java.security.KeyStore; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| persons.stream() | |
| .filter(Person::isMale) | |
| .filter(p -> p.isAdult(LocalDate.now())) | |
| .map(p -> p.getFirstName() + " " + p.getLastName()) | |
| .collect(Collectors.toList()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dn: dc=sewatech,dc=fr | |
| objectClass: top | |
| objectClass: domain | |
| dc: sewatech | |
| dn: ou=people,dc=sewatech,dc=fr | |
| objectClass: top | |
| objectClass: organizationalUnit | |
| ou: people |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dn: dc=sewatech,dc=fr | |
| objectClass: domain | |
| objectClass: top | |
| dc: sewatech | |
| dn: ou=people,dc=sewatech,dc=fr | |
| objectClass: organizationalUnit | |
| objectClass: top | |
| ou: people |
NewerOlder