Skip to content

Instantly share code, notes, and snippets.

View prince-neres's full-sized avatar
:fishsticks:

Prince prince-neres

:fishsticks:
View GitHub Profile
@pedroblandim
pedroblandim / dev-docker-compose.yaml
Last active September 5, 2024 19:42
Liferay docker compose
version: "3.8"
services:
liferay:
image: liferay/portal:7.4.3.19-ga19
container_name: tomcat
networks:
- fs72sp1
depends_on:
- postgres
environment:
@pedroblandim
pedroblandim / getLocalizedCustomFieldValue.ftl
Created August 29, 2022 08:04
LIFERAY: Get localized custom field value on widget template
<#function getLocalizedCustomFieldValue navItem customFieldName>
<#assign customField = navItem.getLayout().getExpandoBridge().getAttribute(customFieldName)>
<#if customField??>
<#list customField?keys as key>
<#if key == locale>
<#return customField?values[key_index]!"" />
</#if>
</#list>
<#else>
<#return "" />
@pedroblandim
pedroblandim / liferay-notification.js
Created June 27, 2022 20:18
Liferay - JS notification sample
AUI().use("liferay-notification", () => {
new Liferay.Notification({
closeable: true,
delay: {
hide: 5000,
show: 0,
},
duration: 1500,
message: "Test message",
render: true,
@pedroblandim
pedroblandim / Notícias em Cards - Widget Template - DDMFormFieldValuesMap.ftl
Last active August 5, 2025 18:14
Simplify Liferay - Vídeo: Estilizando o Publicador de Conteúdos e Mídias | Método 1 - DDMFormFieldValuesMap
<#if entries?has_content>
<div class="container">
<#list entries as entry>
<#assign assetRenderer = entry.getAssetRenderer() />
<#assign DDMFormFieldValuesMap = assetRenderer.getDDMFormValuesReader().getDDMFormValues().getDDMFormFieldValuesMap() />
<#assign DDMFormFieldsReferencesMap = assetRenderer.article.DDMStructure.DDMForm.getDDMFormFieldsReferencesMap(true) />
<div class="box">
<h2>
<#assign titleField = DDMFormFieldsReferencesMap['titulo'].name />
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Commerce Test Plan" enabled="true">
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="hostname" elementType="Argument">
<stringProp name="Argument.name">hostname</stringProp>
<stringProp name="Argument.value">${__P(hostname,localhost)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
@leoGalani
leoGalani / config.py
Last active February 10, 2023 15:25
kafka-confluent-python implementation example
import certifi
from dynaconf import settings
from confluent_kafka.avro import AvroProducer
from confluent_kafka import Consumer
BASE_CONFIG = {
'bootstrap.servers': settings.KAFKA_PRIMARY_BOOTSTRAP_SERVERS,
'group.id': 'integrated-tests',
'client.id': 'integrated-tests',
@yasuflatland-lf
yasuflatland-lf / related_asset_fetch_sample.ftl
Created August 7, 2019 08:22
Fetch Related Assets in Web Content Template
@evaldeslacasa
evaldeslacasa / siteGroupIds.groovy
Created July 4, 2017 21:32
Liferay Groovy Script to get all site ids nested within a site when passing this site id as parameter
import com.liferay.portal.util.*;
import com.liferay.portal.model.*;
import com.liferay.portal.service.*;
import com.liferay.portlet.journal.*;
try {
company = PortalUtil.getCompany(actionRequest)
companyId = company.getCompanyId()
@jordanamorais
jordanamorais / all-aui-validators.jsp
Last active December 3, 2025 09:54
All Liferay AUI Validators (aui:validator)
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<liferay-theme:defineObjects />
<portlet:defineObjects />
<aui:form name="fm2" action="" method="post">
@rxaviers
rxaviers / gist:7360908
Last active December 10, 2025 16:26
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: