Skip to content

Instantly share code, notes, and snippets.

View natecavanaugh's full-sized avatar

Nate Cavanaugh natecavanaugh

View GitHub Profile
@natecavanaugh
natecavanaugh / portal_normal.vm
Created January 19, 2012 18:35
julio's image gallery that seems to have different z-indexes in FF vs Chrome
<div id="gallery1" class="gallery">
<a href="http://miles.local/alloy/demos/image-viewer/assets/lfr-soccer-1.jpg" title="Doug, Meesa and Louis resting">
<img class="picture" src="http://miles.local/alloy/demos/image-viewer/assets/lfr-soccer-1_tn.jpg" />
</a>
<a href="http://miles.local/alloy/demos/image-viewer/assets/lfr-soccer-2.jpg" title="Grand finale teams">
<img class="picture" src="http://miles.local/alloy/demos/image-viewer/assets/lfr-soccer-2_tn.jpg" />
</a>
<a href="http://miles.local/alloy/demos/image-viewer/assets/lfr-soccer-3.jpg" title="Jen looking the landscape">
<img class="picture" src="http://miles.local/alloy/demos/image-viewer/assets/lfr-soccer-3_tn.jpg" />
</a>
@natecavanaugh
natecavanaugh / service-api-comparison.js
Created January 19, 2012 19:34
Comparing Service APIs
//Long forms:
Liferay.Service(
{
'user/get-user-by-id': {
id: 3
}
},
function(obj) {
}
Liferay.Service('user/get-user-by-id', fn);
Liferay.Service('user/get-user-by-id', {}, fn);
Liferay.Service({
'user/get-user-by-id': {}
}, fn);
@natecavanaugh
natecavanaugh / verify-service-api.js
Created January 20, 2012 02:03
Verify Service API
//Verify service API
AUI().use(
'async-queue',
function(A) {
var q = new A.AsyncQueue();
window.q = q;
q.after(
'complete',
function(event) {
@natecavanaugh
natecavanaugh / widget.html
Created January 23, 2012 17:44
Recursive module loader that shows the full dependency tree of AlloyUI and YUI modules
<!DOCTYPE html>
<html>
<head>
<script src="../build/yui/yui.js" type="text/javascript"></script>
<script src="../build/aui-base/aui-base.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" />
</head>
AUI.add(
'liferay-util-window',
function(A) {
var Util = Liferay.Util;
var Window = Util.Window;
Util.incrementWindowXY = function(decrement) {
var incrementor = Window.XY_INCREMENTOR;
var windowXY = Window.XY;
@natecavanaugh
natecavanaugh / update_gallery_modules.sh
Created March 14, 2012 15:37
Command to commit gallery modules with tickets in those modules
@natecavanaugh
natecavanaugh / custom.css
Created April 17, 2012 00:50
Welcome theme example css
@import "compass";
/* Wrapper */
#wrapper {
font-size: 16px;
margin: 0 auto;
padding: 35px 0 0;
position: relative;
width: 700px;
@natecavanaugh
natecavanaugh / cplinks.html
Created April 26, 2012 21:48
Control panel links
function checkFiles($filearr, $uploaddir, $requireimage=false, $filter=array())
{
$maxsize = ini_get("upload_max_filesize");
$final = array('errors' => array(),
'files' => array(),
'result' => array()
);