Skip to content

Instantly share code, notes, and snippets.

Douglas C. R. Paes douglascrp

Block or report user

Report or block douglascrp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Verificar dns reverso
host <server_ip>
host <server_dns_name>
The values returned should match in order to be ok
View Teste registro protocolo do sinadura no Firefox
Abrir uma nova aba e digitar na barra de endereço:
```
data:text/html,<a href="sinadura://resolve?domain=Bold">Link</a>
```
View configuracoes ssh.txt
No servidor ssh
Criar novo usuário (não root)
# adduser <user>
Dar permissão de sudo para novo usuário
# echo '<user> ALL=(ALL) ALL' >> /etc/sudoers
Bloquear acesso ssh com root, desligar login com senha e trocar porta padrão
# vim /etc/ssh/sshd_config
@douglascrp
douglascrp / Alfresco with Apache proxy and Let's Encrypt on Ubuntu
Last active Feb 15, 2019
Alfresco with Apache proxy and Let's Encrypt on Ubuntu
View Alfresco with Apache proxy and Let's Encrypt on Ubuntu
sudo apt-get install apache2
sudo a2enmod proxy
sudo a2enmod proxy_ajp
sudo mkdir -p /var/www/<alfresco-domain>
sudo chown -R $USER:$USER /var/www/<alfresco-domain>
sudo chmod -R 755 /var/www
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/<alfresco-domain>.conf
sudo vim /etc/apache2/sites-available/<alfresco-domain>.conf
@douglascrp
douglascrp / gist:eef2ab7197fea613a77f593b7784aac8
Created Feb 6, 2019 — forked from fmaul/gist:2a726224e23381fa41f9
Change username for cm:owner cm:creator cm:modifier in Alfresco Javascript Console
View gist:eef2ab7197fea613a77f593b7784aac8
var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var behaviourFilter = ctx.getBean("policyBehaviourFilter");
// -----------------------------------------------------------------
function findAndReplaceAttribute(query, attribute, value) {
nodes = search.luceneSearch(query);
for each(var node in nodes) {
@douglascrp
douglascrp / start-wf-assigned-to-site-group.js
Created Feb 6, 2019 — forked from alfrescian/start-wf-assigned-to-site-group.js
Start Alfresco Workflow assigned to SiteManager group of a site
View start-wf-assigned-to-site-group.js
var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var javaSiteService = ctx.getBean("siteService");
var site = javaSiteService.getSite(document.nodeRef);
var siteManagerGroup = javaSiteService.getSiteRoleGroup(site.getShortName(), "SiteManager", true);
var groupAssignee = people.getGroup(siteManagerGroup)
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$activitiParallelGroupReview";
workflow.parameters.requiredApprovePercent = 20;
workflow.parameters["bpm:workflowDescription"] = "Please review and approve: " + document.name;
View update_thumbnail.js
importClass(Packages.org.springframework.web.context.ContextLoader);
importClass(Packages.org.alfresco.service.cmr.repository.TransformationOptions);
var context = ContextLoader.getCurrentWebApplicationContext();
var alfThumbnailService = context.getBean("thumbnailService");
alfThumbnailService.updateThumbnail(document.getThumbnail("webpreview").nodeRef, new TransformationOptions());
@douglascrp
douglascrp / cleaner.js
Created Feb 6, 2019 — forked from wingyplus/cleaner.js
Delete all file in archive store
View cleaner.js
importClass(Packages.org.springframework.web.context.ContextLoader);
importClass(Packages.org.alfresco.service.cmr.repository.StoreRef);
var ctx = ContextLoader.getCurrentWebApplicationContext();
var archiveService = ctx.getBean("nodeArchiveService");
archiveService.purgeAllArchivedNodes(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"));
View runas.js
var RunAsUtil = {
execute: function(workFunction, runAsUser) {
Packages.org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(new Packages.org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork()
{
doWork: workFunction
}, runAsUser);
},
doInTransaction: function(workFunction) {
var txs = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext().getBean("TransactionService");
var th = txs.getRetryingTransactionHelper();
View VBScript class for json encode decode
Reference: http://demon.tw/my-work/vbs-json.html
VbsJson class for parsing JSON format data with VBS
Tags: JavaScript , JSON , VB , VBS , VBScript
Title: The VBS resolve VbsJson class of JSON data format of: Demon
Link: http://demon.tw/my-work/vbs-json.html
Copyright: All articles in this blog are subject to the terms of " Signature - Non-Commercial Use - Share 2.5 China in the Same Way ".
You can’t perform that action at this time.