Skip to content

Instantly share code, notes, and snippets.

View lipusz's full-sized avatar
🏘️

Tibor Lipusz lipusz

🏘️
  • Liferay Inc.
  • Budapest, Hungary
View GitHub Profile
@lipusz
lipusz / .classpath
Last active August 29, 2015 14:22
Test Lucene deleteAll() v3.5.0
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/commons-io.jar"/>
<classpathentry kind="lib" path="lib/lucene-core-3.5.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@lipusz
lipusz / portal-test-ext.properties
Created September 17, 2015 11:35
portal-test-ext.properties for Liferay 7.0
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal-test?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=yourUser
jdbc.default.password=yourPassword
#MASTER_HOME is set as an env variable in ~.bashrc
liferay.home=${env.MASTER_HOME}
module.framework.base.dir=${liferay.home}/osgi
@lipusz
lipusz / .classpath
Created June 19, 2013 14:56
This is a sample Liferay portlet to demonstrate ice:dataPaginator in action. It was developed under liferay-plugins-sdk-5.2.6.
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/.svn/**|.svn/" kind="src" path="docroot/WEB-INF/src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/portal-5.2.6"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/commons-beanutils-1.8.0.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/commons-collections-3.2.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/commons-digester-1.8.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/icefaces-ee-3.2.0-ga.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/icefaces-ee-ace-3.2.0-ga.jar"/>
@lipusz
lipusz / UpdateLayoutAction.java.diff
Created September 13, 2013 17:53
http://issues.liferay.com/browse/LPS-39666 Hidden pages break page sorting in navigation bar
diff --git a/portal-impl/src/com/liferay/portlet/layoutsadmin/action/UpdateLayoutAction.java b/portal-impl/src/com/liferay/portlet/layoutsadmin/action/UpdateLayoutAction.java
index 159fe2c..fec898f 100644
@@ -29,6 +29,7 @@ import com.liferay.portal.model.Layout;
import com.liferay.portal.model.LayoutConstants;
import com.liferay.portal.model.LayoutPrototype;
import com.liferay.portal.security.permission.ActionKeys;
+import com.liferay.portal.service.LayoutLocalServiceUtil;
import com.liferay.portal.service.LayoutPrototypeServiceUtil;
import com.liferay.portal.service.LayoutServiceUtil;
import com.liferay.portal.service.ServiceContext;
@lipusz
lipusz / .classpath
Last active May 6, 2016 17:01
Sample (Eclipse-based) project to play with Lucene. Index, search.
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/lucene-analyzers-common-4.3.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-core-4.3.1.jar" sourcepath="/lucene-solr"/>
<classpathentry kind="lib" path="lib/lucene-queryparser-4.3.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@lipusz
lipusz / build.gradle
Last active March 13, 2019 13:19
Customize liferay-portal's 'modules/build.gradle' to append custom suffix to the generated Eclipse project names in the .project file
import com.liferay.gradle.util.FileUtil
import com.liferay.gradle.util.GradleUtil
import com.liferay.gradle.util.copy.StripPathSegmentsAction
import java.util.concurrent.ConcurrentSkipListSet
import org.apache.tools.ant.filters.ReplaceTokens
import org.gradle.plugins.ide.api.XmlFileContentMerger
import org.gradle.plugins.ide.eclipse.model.Classpath
@lipusz
lipusz / search-bar-ES-6.x-query-with-Result-Rankings.json
Last active October 4, 2019 16:49
Liferay Portal & DXP 7.2 - Search Bar widget search queries for Elasticsearch
// Keyword: dxp
// Result Rankings:
// - 2 Web Content articles pinned & reorderd
// - 1 Web Content article hidden
{
"from":0,
"size":20,
"query":{
"bool":{
PUT liferay-20098-workflow-metrics-tasks
{
"mappings": {
"date_detection": false,
"dynamic_templates": [
{
"template_ar": {
"mapping": {
"analyzer": "arabic",

The latest version of gitg that comes with PPA of Ubuntu 22.04 does not support shallow clones: https://gitlab.gnome.org/GNOME/gitg/-/issues/249

As I’m cloning the liferay repos with --depth=50000 (to limit the history) that’s an issue to me. I've been using 0.2.7-3 for 10 years due to it's been more stable with large repos like Liferay’s and it has worked well even with shallow clones so I wanted to install it back.

  1. Download https://launchpad.net/ubuntu/utopic/amd64/gitg/0.2.7-3
  2. sudo dpkg -i sudo dpkg -i gitg_0.2.7-3_amd64.deb
  3. sudo apt-mark hold gitg
  4. sudo apt-get install libgdk-pixbuf2.0-0 libgdk-pixbuf-xlib-2.0-0 dbus-x11 libgtksourceview-3.0-1 libgtksourceview-3.0-common
2023-01-31 16:25:02.610 INFO [liferay/background_task-3][ReindexSingleIndexerBackgroundTaskExecutor:122] Start reindexing company 20097 for class name com.liferay.trash.model.TrashEntry
2023-01-31 16:25:02.621 INFO [liferay/background_task-4][ReindexSingleIndexerBackgroundTaskExecutor:122] Start reindexing company 20097 for class name com.liferay.asset.kernel.model.AssetEntry
2023-01-31 16:25:02.634 INFO [liferay/background_task-5][ReindexSingleIndexerBackgroundTaskExecutor:122] Start reindexing company 20097 for class name com.liferay.asset.kernel.model.AssetCategory
2023-01-31 16:25:02.654 INFO [liferay/background_task-6][ReindexSingleIndexerBackgroundTaskExecutor:122] Start reindexing company 20097 for class name com.liferay.asset.kernel.model.AssetTag
2023-01-31 16:25:02.661 INFO [liferay/background_task-3][ReindexSingleIndexerBackgroundTaskExecutor:145] Finished reindexing company 20097 for class name com.liferay.trash.model.TrashEntry
2023-01-31 16:25:02.661 INFO [liferay/background_task-4][Reind