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
https://github.com/react-brasil/ |
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
version: '3' | |
services: | |
redis: | |
image: redis | |
container_name: dev_redis | |
hostname: redis | |
environment: | |
- TZ=America/Sao_Paulo | |
ports: | |
- "6379:6379" |
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
import java.util.Date; | |
import java.time.Instant; | |
import java.time.ZoneId; | |
import java.time.ZonedDateTime; | |
import java.time.zone.ZoneOffsetTransition; | |
import java.time.zone.ZoneRules; | |
public class TimezoneList { | |
public static void main(String[] args) { |
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
import javax.persistence.EntityManager; | |
import javax.persistence.PersistenceContext; | |
import org.hibernate.Session; | |
import org.hibernate.StatelessSession; | |
import org.springframework.stereotype.Repository; | |
@Repository | |
public class StatelessRepository { |
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
UserService service = new UserService(url); // Service class | |
port = service.getPort(IUser.class); // the HTTP port of the webservice | |
Client client = ClientProxy.getClient(port); | |
HTTPConduit http = (HTTPConduit) client.getConduit(); | |
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); | |
httpClientPolicy.setConnectionTimeout(30000); //the timeout in milli | |
httpClientPolicy.unsetReceiveTimeout(); | |
http.setClient(httpClientPolicy); |
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
# rpm | |
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \ | |
-O jdk-7-linux-x64.rpm | |
# ubuntu | |
wget --no-cookies \ | |
--no-check-certificate \ |
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 EntregaController extends ControllerBase { | |
private String retornoIndex = "/pages/entregas/index?faces-redirect=true"; | |
private @Getter @Setter Date data; | |
private @Getter @Setter Entregador entregador; | |
private @Getter @Setter String periodoInicial; | |
private @Getter @Setter String periodoFinal; | |
private StreamedContent relatorio; |
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
import java.io.ByteArrayInputStream; | |
import java.io.InputStream; | |
import java.util.Map; | |
import javax.faces.context.FacesContext; | |
import javax.servlet.ServletContext; | |
import net.sf.jasperreports.engine.JRDataSource; | |
import net.sf.jasperreports.engine.JasperExportManager; | |
import net.sf.jasperreports.engine.JasperFillManager; |
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 br.com.mcde.sistema.utils; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.Channels; | |
import java.nio.channels.ReadableByteChannel; | |
import java.nio.channels.WritableByteChannel; |
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 com.maikelsperandio.ssltest; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.security.KeyStore; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.SSLSession; |