Skip to content

Instantly share code, notes, and snippets.

View MarinhoFeliphe's full-sized avatar

Feliphe Marinho MarinhoFeliphe

  • Liferay Inc
  • Recife, Brasil
View GitHub Profile
@MarinhoFeliphe
MarinhoFeliphe / PaymentConfirmedProducer.java
Created June 17, 2024 14:54
PaymentConfirmedProducer
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.security.scram.ScramLoginModule;
import org.apache.kafka.common.serialization.StringSerializer;
import java.util.Properties;
public class PaymentConfirmedProducer {
@MarinhoFeliphe
MarinhoFeliphe / PaymentRequestConsumer.java
Last active June 14, 2024 21:06
PaymentRequestConsumer
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.common.security.scram.ScramLoginModule;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.time.Duration;
import java.util.List;
{
"entryType":"Web Content Article",
"entryClassPK":"34471",
"transitionURL":"/o/headless-admin-workflow/v1.0/workflow-tasks/34488/change-transition",
"entryClassName":"com.liferay.journal.model.JournalArticle",
"kaleoTaskInstanceToken":{
"columnBitmask":0,
"cachedModel":false,
"groupId":20119,
"dueDate":null,
@MarinhoFeliphe
MarinhoFeliphe / settings.gradle
Created May 25, 2023 03:18
settings.gradle pointing to local plugins
buildscript {
dependencies {
classpath files("/home/... the entire path to .../liferay-portal/modules/sdk/gradle-plugins-workspace/build/tmp/jar/com.liferay.gradle.plugins.workspace-6.1.4.jar")
classpath files("/home/... the entire path to .../liferay-portal/modules/sdk/gradle-plugins-workspace/lib/com.liferay.workspace.bundle.url.codec-1.0.0.jar")
classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.2.0"
classpath group: "com.bmuschko", name: "gradle-docker-plugin", version: "6.7.0"
classpath group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.10.3"
classpath group: "com.fasterxml.jackson.dataformat", name: "jackson-dataformat-yaml", version: "2.10.3"
classpath group: "com.google.code.gson", name: "gson", version: "2.9.0"
classpath group: "com.liferay", name: "com.liferay.gradle.plugins", version: "14.0.128"
@MarinhoFeliphe
MarinhoFeliphe / FooScriptingKaleoTaskAssignmentSelector.java
Last active April 27, 2023 20:03
Scripted Assignment - Java language
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
@MarinhoFeliphe
MarinhoFeliphe / install-mysql-fedora.md
Last active February 18, 2021 20:42
How to install mysql in Fedora

Install Mysql in Fedora Distribution

Author: Rodrigo Cunha

In your terminal:

sudo dnf -y install https://dev.mysql.com/get/mysql80-community-release-fc32-1.noarch.rpm

sudo dnf -y install mysql-community-server

sudo systemctl start mysqld.service

@MarinhoFeliphe
MarinhoFeliphe / install-mysql-5.7-ubuntu.md
Last active February 18, 2021 21:31
How to Install MySQL 5.7 for Ubuntu 18.04

Install mysql 5.7 for Ubuntu 18.04

  • On your home path, create a folder mkdir mysql-ws to download mysql files
  • On your download folder cd mysql-ws, download the mysql bundle. wget https://downloads.mysql.com/archives/get/p/23/file/mysql-server_5.7.28-1ubuntu18.04_amd64.deb-bundle.tar
  • Extract tar file
    • tar -xvf mysql-server_5.7.28-1ubuntu18.04_amd64.deb-bundle.tar
    • The command above, will extract in the current folder.
  • Delete some unnecessary files rm -rf mysql-testsuite_5.7.28-1ubuntu18.04_amd64.deb mysql-community-test_5.7.28-1ubuntu18.04_amd64.deb
  • To install mysql, run sudo dpkg -i mysql-*deb