Skip to content

Instantly share code, notes, and snippets.

View caneta's full-sized avatar
🤓
NeoVimming

Alessandro Candini caneta

🤓
NeoVimming
  • Pavia, Italy
View GitHub Profile
@kiview
kiview / docker_volume_backup.sh
Last active January 18, 2024 12:25
Docker-Compose volume backup
#!/bin/bash
compose_file_path=$1
project_name=$2
backup_path=$3
function backup_volume {
volume_name=$1
backup_destination=$2
@bmvakili
bmvakili / liferay_dump.ftl
Last active February 14, 2018 09:00 — forked from jamesfalkner/liferay_dump.ftl
Dump Liferay 7 GA4 variables in Freemarker - adapted from James Falkner's original
<#attempt>
<#assign black_list = ["class", "request", "getreader", "getinputstream", "writer"] />
<#macro dump key data>
<#if data?is_enumerable>
<p><b>${key}</b>
<@printList data,[] />
<#elseif data?is_hash_ex>
<p><b>${key}</b>
@jamesfalkner
jamesfalkner / liferay-7-wcm-adt-dump.ftl
Created November 24, 2015 21:45
A simple utility template to dump all available Liferay 7 WCM/ADT variables and their values.
<#-- dump.ftl
--
-- Generates tree representations of data model items.
--
-- Usage:
-- <#import "dump.ftl" as dumper>
--
-- <#assign foo = something.in["your"].data[0].model />
--
-- <@dumper.dump foo />
@beci
beci / gcc 5 on ubuntu 14.04
Created October 15, 2015 07:18
use gcc 5.x on ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
@bmvakili
bmvakili / freemarker_variables_wcm
Created January 20, 2015 14:23
liferay 6.2 GA2 web content template freemarker variables available
scopeGroupId
expandoRowLocalService
reserved-article-id
unicodeLanguageUtil
serviceLocator
reserved-article-author-email-address
userGroupPermission
userPermission
staticFieldGetter
Images