Skip to content

Instantly share code, notes, and snippets.

@CesarCapillas
CesarCapillas / Basic apache setup
Last active May 16, 2017 22:08
Apache recipes
$ sudo apt-get install apache2
$ sudo a2enmod proxy
$ sudo a2enmod proxy_ajp
$ sudo a2enmod rewrite
$ sudo vim /etc/apache2/sites-enabled/default-ssl.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
@CesarCapillas
CesarCapillas / Check site members
Last active May 16, 2017 21:43
Alfresco Shell Scripts
$ curl --silent https://services.zylk.net/alfresco/service/api/sites |grep shortName|wc -l
31
In JS Console
var s = siteService.getSites("", "", 0);
s.forEach(function(entry) {
var members = entry.listMembers(null, "", 0, false);
for (userName in members) {
logger.log(entry.shortName+ " :: "+userName);
@CesarCapillas
CesarCapillas / Check ballooning
Last active May 16, 2017 21:47
Ubuntu recipes
#Si difieren mucho puede indicar balloning
ps aux | tr -s ' ' | awk 'BEGIN{sum=0}{ sum+=$6 }END{print expr sum/1024}'
free -m
@CesarCapillas
CesarCapillas / Importing JS
Last active December 10, 2024 22:31
Alfresco Javascript Console Recipes
Import a script from the repository using a name-based path:
<import resource="/Company Home/Data Dictionary/Scripts/library.js">
Import a script from the repository using a NodeRef reference:
<import resource="workspace://SpacesStore/6f73de1b-d3b4-11db-80cb-112e6c2ea048">
Import a script from a Java classpath location: