Skip to content

Instantly share code, notes, and snippets.

View sammso's full-sized avatar

Sampsa Sohlman sammso

View GitHub Profile
@sammso
sammso / running-sql-queries.md
Last active June 28, 2019 10:43 — forked from milendyankov/DXP70-runSQL.groovy
Running SQL queries from liferay's groovy console

Running SQL queries:

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import com.liferay.portal.kernel.dao.jdbc.DataAccess;

Connection con = null;
@sammso
sammso / lr62-logging-template.md
Last active March 11, 2019 13:26
LR 6.2 - Logging Template

Liferay logging template to easy use

/WEB-INF/classes/META-INF/portal-log4j-ext.xml
<?xml version="1.0"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
@sammso
sammso / Systems Operations on AWS.md
Last active June 28, 2022 07:09
Systems Operations on AWS

Systems Operations on AWS - Lab 2L - Creating Amazon EC2 Instances (Linux)

Task 3: Launch an Instance using the AWS CLI

This command gets current Availability Zone

# Set the Region - 
AZ=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone`
export AWS_DEFAULT_REGION=${AZ::-1}

Configuration portlet

https://www.dropbox.com/s/wsspavxno4gesw4/supercoolmvc.zip?dl=0

Clean up LCS

  • Shutdown portal
  • Remove bundles/osgi/marketplace/LCS .. Client.lpkg
  • Remove all files and folders from bundles/osgi/state/
  • Remove all files and folders from bundles/tomcat.../work/
  • Remove all files and folders from bundles/tomcat.../temp/
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/application-list" prefix="liferay-application-list" %>
<%@ taglib uri="http://liferay.com/tld/asset" prefix="liferay-asset" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/captcha" prefix="liferay-captcha" %>
@sammso
sammso / leiden-platform-developer.md
Last active April 16, 2018 06:57
This file is for the students of Platform Developer at Leiden 9th April, 2018