Skip to content

Instantly share code, notes, and snippets.

@mjbradford89
mjbradford89 / gist:8698954
Created January 29, 2014 22:52
practice theme
@font-face {
font-family: 'ChunkFiveRegular';
src: url('../fonts/Chunkfive-webfont.woff');
}
@font-face {
font-family:'BitstreamVeraSansBoldOblique';
src: url('../fonts/Vera-Bold-Italic-webfont.woff');
}
var obj = AUI().Component.create( {
prototype: {
bind: function() {
return function(x) { return x + 1; }
}
}
});
var x = obj.bind();
<div class="btn-group" id="yui_2_5_0_1_1401293648379_841">
<button type="button" class="btn btn-default btn-default-content yui3-widget yui3-btn yui3-btn-content yui3-btn-focused" id="yui_2_5_0_1_1401293648379_876"><span class="glyphicon glyphicon-ok-sign"></span> Save</button>
<button type="button" class="btn btn-default btn-default-content yui3-widget yui3-btn yui3-btn-content" id="yui_2_5_0_1_1401293648379_840">Cancel</button>
</div>
@mjbradford89
mjbradford89 / full_content.jsp
Last active August 29, 2015 14:02
LPS-47632
//String redirect = ParamUtil.getString(request, "redirect");
List results = (List)request.getAttribute("view.jsp-results");
//if (Validator.isNull(redirect) && results.isEmpty()) {
PortletURL portletURL = renderResponse.createRenderURL();
portletURL.setParameter("struts_action", "/asset_publisher/view");
String redirect = portletURL.toString();
@mjbradford89
mjbradford89 / gist:fb2c2063b82a9313de7b
Last active August 29, 2015 14:04
datepicker accessibility test
YUI.add('aui-datepicker-tests', function(Y) {
var suite = new Y.Test.Suite('aui-datepicker');
suite.add(new Y.Test.Case({
name: 'DatePicker',
setUp: function() {
this.datePicker = new Y.DatePicker({
on: {
//When using simple editor in blogs
function _161_OnDescriptionEditorInit() {
document.getElementById('_161_descriptionEditor').setAttribute('contenteditable', false);
}
//Generates the error
LogListener.logged threw a non-fatal unchecked exception as follows:
17:37:38,146 ERROR [com.liferay.portal.log.bridge.internal.LogBridge@3d6ec43f][com_liferay_portal_servlet_jsp_compiler:75] null
java.lang.ClassCastException
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:514)
at org.apache.felix.eventadmin.impl.adapter.LogEventAdapter$1.logged(LogEventAdapter.java:180)
at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.safeLogged(ExtendedLogReaderServiceFactory.java:88)
at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory$LogTask.run(ExtendedLogReaderServiceFactory.java:35)
at org.eclipse.osgi.internal.log.SerializedTaskQueue$1.run(SerializedTaskQueue.java:33)
LogListener.logged threw a non-fatal unchecked exception as follows:
@mjbradford89
mjbradford89 / gist:098f4d5b3510ac8b51c6
Created April 22, 2015 21:09
PortalWebResourcesUtil.java
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
@mjbradford89
mjbradford89 / gist:74c9fe22acd3bedfdb77
Created April 24, 2015 19:04
deploy-static-files
<target name="deploy-static-files">
<delete file="${liferay.home}/osgi/portal/${plugin.name}.${plugin.packaging}" />
<delete file="${liferay.home}/osgi/portal/${plugin.name}-wsdd.jar" />
<delete dir="classes" />
<delete dir="docroot/WEB-INF/classes" />
<delete file="ivy.xml.MD5" />
<deploy
module.dir="${basedir}"
/>
mplayer -ao null $1 -vo jpeg:outdir=output
echo "explosion complete."
notify-send "explosion complete."
convert output/* output.gif
echo "conversion complete."
notify-send "conversion complete."