Skip to content

Instantly share code, notes, and snippets.

May 21, 2012 8:31:52 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
May 21, 2012 8:31:52 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
May 21, 2012 8:31:52 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
May 21, 2012 8:31:52 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 803 ms
May 21, 2012 8:31:52 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
@eduardolundgren
eduardolundgren / gist:2728226
Created May 18, 2012 23:55
A.DataTable.prototype.getColumn
A.DataTable.prototype.getColumn = (function (original) {
return function (seed) {
if (A.instanceOf(seed, A.Node)) {
var cell = this.getCell(seed),
prefix = this.getClassName('col', '');
seed = cell.get('className');
seed = seed.substring(seed.indexOf(prefix));
seed = seed.substring(prefix.length, seed.indexOf(' '));
}
<model-resource>
<model-name>com.liferay.calendar.model.Calendar</model-name>
<portlet-ref>
<portlet-name>1</portlet-name>
</portlet-ref>
<permissions>
<supports>
<action-key>DELETE</action-key>
<action-key>MANAGE_BOOKINGS</action-key>
<action-key>PERMISSIONS</action-key>
@eduardolundgren
eduardolundgren / gist:2639385
Created May 8, 2012 21:18
DataTable adding new rows example
<!DOCTYPE html>
<html>
<head>
<script src="../../build/aui/aui.js" type="text/javascript"></script>
</head>
<body class="yui3-skin-sam">
<h1>Alloy - DataTable - Inline Cell Editing</h1>
>> ant build-taglibs
Buildfile: /Volumes/liferay/github/liferay-portal/util-taglib/build.xml
build-taglibs:
[java] Loading file:/Volumes/liferay/github/liferay-portal/portal-web/docroot/WEB-INF/classes/system.properties
[java] May 4, 2012 10:36:21 PM com.liferay.portal.kernel.log.Jdk14LogImpl info
[java] INFO: No server detected
[java] May 4, 2012 10:36:21 PM com.liferay.portal.kernel.log.Jdk14LogImpl info
[java] INFO: Global lib directory
[java] May 4, 2012 10:36:21 PM com.liferay.portal.kernel.log.Jdk14LogImpl info
@eduardolundgren
eduardolundgren / gist:2564664
Created May 1, 2012 03:13
Resize respect ratio when shift is pressed
<!DOCTYPE html>
<html>
<head>
<script src="../../build/aui/aui.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../build/aui-skin-classic/css/aui-skin-classic-all-min.css" type="text/css" media="screen" />
<style type="text/css" media="screen">
body {
<aui:script>
Liferay.provide(
window,
'<portlet:namespace />load',
function(url, callback) {
var A = AUI();
var response = null;
A.io.request(
@eduardolundgren
eduardolundgren / gist:2426326
Created April 20, 2012 05:35
Normalizing UTC Dates
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;
public class TestDate {
public CalendarResource addCalendarResource(
long userId, long groupId, String className, long classPK,
String classUuid, long defaultCalendarId, String code, Map<Locale,
String> nameMap, Map<Locale, String> descriptionMap, String type,
boolean active, ServiceContext serviceContext)
throws PortalException, SystemException {
// Calendar resource
long calendarResourceId = counterLocalService.increment();
A.SchedulerEvent = A.Component.create({
NAME: 'scheduler-event',
ATTRS: {
allDay: {
value: false,
validator: isBoolean
},
calendarId: {