This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# crontab | |
# 0 5 * * * /opt/alfresco/scripts/cleanlogs.sh | |
DAYS_TO_KEEP=7 | |
find /opt/alfresco/logs/* -maxdepth 0 -name '*.log*' -mtime +${DAYS_TO_KEEP} -type f -exec rm {} \; | |
find /opt/alfresco/logs/bart/* -maxdepth 0 -name '*.log*' -mtime +${DAYS_TO_KEEP} -type f -exec rm {} \; | |
find /opt/alfresco/tomcat/logs/* -maxdepth 0 -name '*.log*' -mtime +${DAYS_TO_KEEP} -type f -exec rm {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the command to be used in the cron schedule to have the certificates automatically renewed | |
certbot renew --pre-hook "service apache2 stop" --post-hook "service apache2 start" --authenticator standalone --agree-tos --email <email> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To be used with Alfresco JS Console. Select folder in js console to create export package for | |
var exportaction = actions.create("export"); | |
exportaction.parameters["store"] = "workspace://SpacesStore"; | |
exportaction.parameters["package-name"] = space.properties.name + "_export.acp"; | |
exportaction.parameters["destination"] = space.parent; | |
exportaction.parameters["include-children"] = true; | |
exportaction.parameters["include-self"]=true; | |
exportaction.parameters["encoding"]="UTF-8"; | |
exportaction.execute(space); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Delete thumbnails if exists. To be used in Alfresco javascript console. Starts from selected space | |
recurse(space, function(node) { | |
var doclib = node.getThumbnail('doclib'); | |
var webpreview = node.getThumbnail('webpreview'); | |
var webpreview2 = node.getThumbnail('web-preview'); | |
var imgpreview = node.getThumbnail('imgpreview'); | |
var pdf = node.getThumbnail('pdf'); | |
if(doclib){ | |
doclib.remove(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instalação | |
========== | |
1 - Baixar o pacote | |
http://uk.support.tomtom.com/app/answers/detail/a_id/24741/~/linux-version-of-tomtom-sports-connect | |
2 - Instalar | |
sudo dpkg -i tomtomsportsconnect.x86_64.deb | |
3 - Corrigir dependências faltando | |
sudo apt-get -f install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# JavaScript https://community.alfresco.com/thread/193889-is-there-any-way-to-remove-node-property-using-js-api#comment-739758 # | |
delete node.properties["yourprefix:yourproperty"]; | |
node.save(); | |
# Java https://community.alfresco.com/thread/193889-is-there-any-way-to-remove-node-property-using-js-api#comment-651225 # | |
nodeService.removeProperty(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>net.alchim31.maven</groupId> | |
<artifactId>yuicompressor-maven-plugin</artifactId> | |
<version>1.5.1</version> | |
<executions> | |
<execution> | |
<id>compress-assembly</id> | |
<goals> | |
<goal>compress</goal> | |
</goals> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Script to locate error nodes from solr error report, and do something with them. | |
* | |
* @author Younes Regaieg <[email protected]> | |
* @version 1.0 | |
**/ | |
//----- Solr error report to be fetched from solr /solr4/alfresco/query?q=EXCEPTIONMESSAGE:*&wt=json&rows=<number-of-rows-to-fetch> | |
//----- Swap this dummy object with a real object from the output of the endpoint mentionned above. | |
var solrErrorsReport = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Print object's permissions | |
logger.warn(document.directPermissions); | |
logger.warn(document.fullPermissions); | |
// Stop permission inheritance | |
document.setInheritsPermissions(false); | |
// Give a specific group the SiteCollaborator permission | |
document.setPermission("SiteCollaborator", "GROUP_docs_cliente_empreendimento"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u postgres psql alfresco | |
sudo -u postgres pg_activity -d alfresco | |
Sem clientes conectados: | |
VACUUM FULL VERBOSE ANALYZE; | |
REINDEX DATABASE <database>; | |
https://wiki.postgresql.org/wiki/Disk_Usage | |
http://pgtune.leopard.in.ua/ |