Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

José Vieira Neto netodevel

🏠
Working from home
  • São Paulo, Brasil
View GitHub Profile
View app.properties
# Database
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=admin
quarkus.datasource.password=admin
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/demo_quarkus
quarkus.datasource.jdbc.max-size=16
# DevServices
quarkus.datasource.devservices=false
View changeLog.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include file="changelogs/2021-09-12-144812-create-table-users.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>
View create-table.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet id="1" author="nt-cli">
<createTable tableName="users">
<column name="id" autoIncrement="true" type="BIGINT" >
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="name" type="varchar(255)"/>
<column name="email" type="varchar(255)"/>
</createTable>
View strutura
-- resources
- db
- 2021-09-12-144812-create-table-users.xml
changeLog.xml
View deps-liquibase.xml
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-liquibase</artifactId>
</dependency>
View ElasticSearchConfig.java
import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ElasticsearchConfig {
View pom.xml
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.8.0</version>
</dependency>
@netodevel
netodevel / sample.java
Created Jul 5, 2019
integration cli error
View sample.java
public class TemplateCommand extends OptionParsingCommand {
public TemplateCommand(String name, String description, OptionHandler handler) {
super(name, description, handler);
}
@Override
public String getUsageHelp() {
return "[options] <template>";
}
View sample.kt
class EventFragment {
companion object {
var fragmentEventsView : FragmentEventsView? = null
fun register(fragmentEventsView: FragmentEventsView) {
this.fragmentEventsView = fragmentEventsView
}
fun unRegister() {
View list_replication.ex
defmodule Solution do
def main() do
n = IO.gets("") |> String.strip |> String.to_integer
IO.gets("") |> to_list(n)
end
def read_lines
IO.gets("")
end