a shortcut to run Eclipse on Ubuntu Unity and to register Eclipse with the left Launcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.liferay.events; | |
import aQute.bnd.annotation.component.Activate; | |
import aQute.bnd.annotation.component.Component; | |
import aQute.bnd.annotation.component.Deactivate; | |
import com.liferay.portal.kernel.events.ActionException; | |
import com.liferay.portal.kernel.events.SimpleAction; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN apt-get update && \ | |
apt-get -y install curl software-properties-common && \ | |
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ | |
apt-get update && \ | |
apt-get -y install nodejs && \ | |
useradd -m -s $(which bash) liferay && \ | |
chown -R liferay:liferay /usr/lib/node_modules | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Continuously check for bad actors and ban them! | |
0 */2 * * * zgrep "Failed password for root from" /var/log/auth.log | sed "s_.*Failed password for root from \([0-9][^ ]*\).*_\1_" | sort | uniq -c | sort -n | while read x ; do export IP=`echo $x | sed 's_^[ ]*[0-9]* \([0-9].*\)_\1_'`; export TEST=`echo $x | sed 's_^[ ]*\([0-9]*\) [0-9].*_\1_'`; test $TEST -gt 100 && (grep -qxF "ALL: $IP" /etc/hosts.deny || sudo bash -c "echo 'ALL: $IP' >> /etc/hosts.deny ") ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog | |
-Dorg.apache.commons.logging.simplelog.showdatetime=true | |
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=ERROR | |
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
options { | |
buildDiscarder(logRotator(numToKeepStr: '21', artifactNumToKeepStr: '50')) | |
timestamps() | |
timeout(time: 5, unit: 'MINUTES') | |
} | |
parameters{ | |
string(name: 'JAVA_HOME', defaultValue: '/var/jenkins_home/tools/hudson.model.JDK/JDK_7u80/', description: 'JDK', ) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All Liferay Variables | |
See the bottom for the request variable expansion | |
saxReaderUtil = com.liferay.portal.xml.SAXReaderImpl@aed8447 | |
Callable methods: | |
| createXPath | getClass | isProxyClass | createText | hashCode | readURL | class | read | getProxyClass | newProxyInstance | createElement | sort | getInvocationHandler | createDocument | createEntity | selectNodes | createNamespace | createAttribute | equals | createProcessingInstruction | toString | createQName | |
getterUtil = com.liferay.portal.kernel.util.GetterUtil_IW@68bfc4e8 | |
Callable methods: | |
| getClass | getShortStrict | getDouble | getBooleanValues | getInteger | getFloat | getNumber | hashCode | get | getBoolean | getDate | getIntegerStrict | class | getStringValues | getLongStrict | getDateValues | getLongValues | getObject | getFloatValues | getShort | getString | getDoubleValues | getNumberValues | getShortValues | getLong | getIntegerValues | equals | toString | getInstance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logSortedCSSSelectorsOnStylesheets(stylesheets) { | |
var ruleset = new Set(); | |
for (var stylesheet in stylesheets) { | |
var rules = stylesheets[stylesheet].rules; | |
for (var rule in rules) { | |
var stylesheetRule = rules[rule]; | |
if (stylesheetRule.selectorText) { | |
ruleset.add(stylesheetRule.selectorText); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.List; | |
import com.liferay.portal.kernel.dao.orm.DynamicQuery; | |
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; | |
import com.liferay.portal.kernel.dao.orm.OrderFactoryUtil; | |
import com.liferay.portal.kernel.dao.orm.Property; | |
import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; | |
import com.liferay.portlet.journal.model.JournalArticle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.PrintStream; | |
import java.util.List; | |
import com.liferay.portal.kernel.dao.orm.Criterion; | |
import com.liferay.portal.kernel.dao.orm.DynamicQuery; | |
import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; | |
import com.liferay.portal.kernel.exception.SystemException; | |
import com.liferay.portlet.dynamicdatalists.model.DDLRecord; | |
import com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalServiceUtil; |
NewerOlder