Skip to content

Instantly share code, notes, and snippets.

View jardineworks's full-sized avatar

Andrew Jardine jardineworks

View GitHub Profile
@epgarcia
epgarcia / sample.ftl
Last active January 11, 2022 16:54
Freemarker sample to iterate the portletPreferences variable on a Liferay Application Display Template
<#--
portletPreferences: Represents the preferences of the application that are used to display content
through this template. Use the map API of the selected template language to get the values of the
preferences.
-->
<#if portletPreferences?has_content>
<h1>Portlet Preferences</h1>
<ul>
@chbaranowski
chbaranowski / build.gradle
Created March 26, 2015 06:40
Gradle bnd build example
buildscript {
repositories {
ivy {
url 'https://bndtools.ci.cloudbees.com/job/bnd.master/lastSuccessfulBuild/artifact/dist/bundles'
layout 'pattern', { artifact '[module]/[artifact]-[revision].[ext]' /* OSGi repo pattern */ }
}
}
dependencies { classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:3.0.0' }
}
@baxtheman
baxtheman / item full
Last active December 22, 2015 11:09
template x ADT oneshop
<#-- DECLARATIONS -->
<#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] />
<#assign aui = taglibLiferayHash["/WEB-INF/tld/aui.tld"] />
<#assign namespace = renderResponse.getNamespace() />
<#macro translate key >
${languageUtil.get(pageContext, key)}
</#macro>
@eduardolundgren
eduardolundgren / gist:4260723
Created December 11, 2012 18:08
Liferay JSON Web Services (Object Composition)

Liferay JSON Web Services

JSON RPC

/jsonws/calendar-portlet/calendar/get-calendar/calendar-id/10466

Simple JavaScript API

@chitan
chitan / WsChatServlet.java
Created July 7, 2012 01:44
How to use WebSocket of Tomcat
//This sample is how to use websocket of Tomcat.
package wsapp;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.util.ArrayList;
import org.apache.catalina.websocket.MessageInbound;
import org.apache.catalina.websocket.StreamInbound;
import org.apache.catalina.websocket.WebSocketServlet;