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.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; | |
import java.util.List; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; |
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.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; | |
class SevenDaysOfCodeJavaDay1 { | |
public static void main(String[] args) throws Exception { | |
String apiKey = "<sua chave>"; |
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
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | |
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" | |
version="2.0"> | |
<persistence-unit name="contas"> | |
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> | |
<class>br.com.alura.jpa.modelo.Conta</class> |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>br.com.alura.jpa</groupId> | |
<artifactId>projeto-jpa</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<properties> | |
<maven.compiler.target>1.8</maven.compiler.target> |
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 TABLE ator | |
( | |
id_ator SERIAL PRIMARY KEY, | |
primeiro_nome VARCHAR(45) NOT NULL, | |
ultimo_nome VARCHAR(45) NOT NULL, | |
data_atualizado TIMESTAMP NOT NULL DEFAULT 'NOW()' | |
); | |
CREATE INDEX idx_ultimo_nome ON ator USING btree (ultimo_nome); | |
CREATE TABLE idioma |
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 LeilaoSteps implements io.cucumber.java8.Pt{ | |
private LoginPage loginPage; | |
private LeiloesPage leiloesPage; | |
private NovoLeilaoPage novoLeilaoPage; | |
private Browser browser; | |
public LeilaoSteps() { | |
Dado("um usuario logado", () -> { | |
this.browser = new Browser(); |
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/sh | |
echo fs.inotify.max_user_instances=524288 | tee -a /etc/sysctl.conf && sysctl -p | |
echo 999 | tee -a /proc/sys/fs/inotify/max_user_instances | |
echo 99999 | tee -a /proc/sys/fs/inotify/max_queued_events | |
echo 99999 | tee -a /proc/sys/fs/inotify/max_user_watches |
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
<?php | |
echo "Testando conexao <br /> <br />"; | |
$servername = "192.168.1.24"; | |
$username = "phpuser"; | |
$password = "pass"; | |
// Create connection | |
$conn = new mysqli($servername, $username, $password); | |
// Check connection |
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
# execute 'apt-get update' | |
exec { 'apt-update': # exec resource named 'apt-update' | |
command => '/usr/bin/apt-get update' # command this resource will run | |
} | |
package { ['php7.2' ,'php7.2-mysql'] : | |
require => Exec['apt-update'], | |
ensure => installed, | |
} |
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
-- mysql -u root < create-db.sql | |
-- MySQL dump 10.13 Distrib 5.5.59, for debian-linux-gnu (x86_64) | |
-- | |
-- Host: localhost Database: classloader | |
-- ------------------------------------------------------ | |
-- Server version 5.5.59-0ubuntu0.14.04.1 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; |