Skip to content

Instantly share code, notes, and snippets.

View evertonthepaula's full-sized avatar
🇧🇷
HUE, BR!

Everton de Paula evertonthepaula

🇧🇷
HUE, BR!
View GitHub Profile
for(let p = 0, line; line = allTextLines[p++];)
{
var obj = {};
var col = line.split(',');
for(let j = 0, h; h = header[j]; j++)
{
obj[h] = col[j];
}
<!doctype html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>lsita es6</title>
</head>
<body>
<h1>lsita de funcionarios:</h1>
<div class="div-Container"></div>
const NOME = (function(){
"use strict";
let obj = {};
obj.fun01 = function(){};
obj.fun02 = function(){};
obj.fun03 = function(){
return "hello";
$distanceBase = 8px;
//Padding mixin
@mixin padding($top:null, $right:null, $bottom:null, $left:null)
{
padding: calcDistance($top) calcDistance($right) calcDistance($bottom) calcDistance($left);
}
//Margin mixin
@mixin margin($top:null, $right:null, $bottom:null, $left:null)
<#if entries?has_content>
encontrei conteudo <br><hr>
<#list entries as curBlogEntry>
<h3>BlogEntry</h3> ${curBlogEntry} <br><hr>
<!-- PROPRIEDADES QUE ESTÃO DISPONÍVEIS -->
<H3>propriedades disponíveis:</H3>
<b>uuid:</b> ${curBlogEntry.uuid} <br>
<b>entryId:</b> ${curBlogEntry.entryId} <br>
<#if entries?has_content>
encontrei conteudo <br><hr>
<#list entries as curEntry>
<h3>Entries:</h3> ${curEntry} <br><hr>
<!-- PROPRIEDADES QUE ESTÃO DISPONÍVEIS -->
<H3>propriedades disponíveis:</H3>
<b>entryId</b>: ${curEntry.entryId} <br>
@evertonthepaula
evertonthepaula / gist:f361f5c535783ded257470a9ac5d800e
Last active July 9, 2021 18:18
Liferay - ADT - get dynamic fields value
<#if entries?has_content>
<#list entries as curEntry>
<#assign AssetRenderer = curEntry.getAssetRenderer()>
<#assign journalArticle = AssetRenderer.getArticle() />
<#assign document = saxReaderUtil.read(journalArticle.getContent()) />
<#assign rootElement = document.getRootElement() />
<!-- FORMA 01 -->
<#list rootElement.elements() as dynamicElement>
@evertonthepaula
evertonthepaula / gist:3a9d86a41001a202989c32b8c1be59f3
Last active August 15, 2018 14:44
Liferay Display image & documents on Asset Publisher ADT
<#if entries?has_content>
<#list entries as curEntry>
<h3>Entries:</h3> ${curEntry} <br><hr>
<b>entryId:</b> ${curEntry.entryId}<br>
<b>groupId:</b> ${curEntry.groupId}<br>
<b>companyId:</b> ${curEntry.companyId}<br>
<b>userId:</b> ${curEntry.userId}<br>
<b>userName:</b> ${curEntry.userName}<br>
Regex que valida data até com ano bissexto no formato DD/MM/YYY
^(?:(?:31(\|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\|-|\.)(?:0?2)\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$
Regex que valida data até com ano bissexto no formato DD/MM/YYY em formato texto
^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]|(?:Jan|Mar|May|Jul|Aug|Oct|Dec)))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2]|(?:Jan|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)(?:0?2|(?:Feb))\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9]|(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep))|(?:1[0-2]|(?:Oct|Nov|Dec)))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$
function tributes(option) {
return {
id: Object.keys(option).join('').trim(),
get name() {
return option[this.id].name
}
}
}
this.tributesByProps.filter(item => (optionsChecked.includes(item[Object.keys(item).join('').trim()].name)));