Skip to content

Instantly share code, notes, and snippets.

View davidecavaliere's full-sized avatar
🏠
Working from home

Davide Cavaliere davidecavaliere

🏠
Working from home
View GitHub Profile
@davidecavaliere
davidecavaliere / gist:6935929
Last active December 25, 2015 06:59
Sexy bash prompt
PS1='\n\[\033[1;34m\]\342\226\210\342\226\210 \u @ \h: \w\n\[\033[0;36m\]\342\226\210\342\226\210 \t $ \[\033[0;39m\]'
AUI().use(
'anim',
function(A) {
A.all('.animate-scroll').on(
'click',
function(event) {
event.preventDefault();
var section = A.one(event.currentTarget.get('hash'));
var scrollTo = section.get('offsetTop');
@davidecavaliere
davidecavaliere / portal-developer.properties
Created August 6, 2013 11:33
Liferay's portal-developer.properties to disable embedded firebug-lite console, javascript and html minifier.place this file in /liferay-portal-{version}/tomcat-{tomcat-version}/webapps/ROOT/WEB-INF/classes/
javascript.log.enabled=false
javascript.fast.load=false
theme.css.fast.load=false
com.liferay.portal.servlet.filters.minifier.MinifierFilter=false
com.liferay.filters.strip.StripFilter=false
layout.template.cache.enabled=false
browser.launcher.url=
AUI().use(
'aui-base',
function(A) {
var WIN = A.getWin();
var onScreenHelperNode = A.all('.on-screen-helper');
var updateOnScreen = function() {
var currentScrollPos = WIN.get('docScrollY');
AUI().use(
'aui-base',
function(A) {
var popClicks = A.all('.pop-click');
var popClickHandle;
var togglePopClick = function(event) {
event.stopPropagation();
AUI().use(
'aui-base',
function(A) {
var WIN = A.getWin();
var lazyLoadNode = A.all('.lazy-load');
var lazyLoad = function() {
var currentScrollPos = WIN.get('docScrollY');
@davidecavaliere
davidecavaliere / gist:5842260
Last active December 18, 2015 20:39
AUI loads jquery and Galleria plugin
<aui:script>
AUI({
groups: {
'jquery': {
async: false,
modules: {
'jquery': {
fullpath: 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js'
},
'galleria': {
@davidecavaliere
davidecavaliere / gist:5607823
Created May 19, 2013 14:31
aui-io-request example
var io = A.io.request(
url.toString(),
{
autoLoad: false,
cache: true,
method: 'get',
on: {
start: function(event,id) {
console.log('start');
console.log(event);
@davidecavaliere
davidecavaliere / gist:5602338
Created May 17, 2013 22:14
Full working example of aui-datatable
<div id="myDataTable"></div>
<script src="http://cdn.alloyui.com/1.7.0/aui/aui-min.js"></script>
<script>
AUI({
modules: {
'bootstrap': {
fullpath: 'http://alloyui.com/versions/1.7.x/website/css/bootstrap.css',
type: 'css'
},
Maven architype catalogs Vaadin - Liferay:
http://repo1.maven.org/maven2/archetype-catalog.xml