Skip to content

Instantly share code, notes, and snippets.

View toodooleedoo's full-sized avatar

Eric Soukenka toodooleedoo

View GitHub Profile
@toodooleedoo
toodooleedoo / README.md
Last active March 23, 2021 22:23
AEM Just playing with adding properties via Node

Playing with adding properties via CQ's Node API.

Not meant to be used as a production solution but gives some handy concepts.

@toodooleedoo
toodooleedoo / change_admin_password.sh
Last active August 29, 2019 00:29
#AEM #CURL Change Admin Password
curl -u admin:admin -F rep:password="aem6dev" -F :currentPassword="admin" http://<<<CUT>>>:4502/home/users/a/admin.rw.html
@toodooleedoo
toodooleedoo / README.md
Last active October 19, 2017 00:26
#AEM #CQ Rotate Logs

#CQ #NIX Rotate Logs

Rotates AEM/CQ logs

node_modules
@toodooleedoo
toodooleedoo / deactivated_pages_list.sh
Last active September 18, 2017 12:24
#AEM #CQ #LINUX #QUERYBUILDER Get List of Deactivated pages
curl -u admin:admin “http://<<<CUT>>>:7402/author/bin/querybuilder.json?orderby=%40cq%3atime&orderby.sort=desc&p.limit=-1&path=%2fvar%2faudit%2fcom.day.cq.replication%2fcontent%2f01%2fna&property=cq%3atype&property.1_value=Activate&property.2_value=Deactivate&type=cq%3aAuditEvent” > deactivated_pages_qa.txt
@toodooleedoo
toodooleedoo / README.md
Last active June 23, 2017 13:38
#AEM #Sightly #SSJS Server Side JavaScript Use-API Breadcrumbs

###Description Retrieve a Page Object from all pages which are in the Site root then build a breadcrumb component and display the current pages title in a submenu.

###Use case Display a bar under eg a menu which displays the current pages title and functional breadcrumb components o the right.

##Requirements

  • Responsive and which works on all mobile devices and desktop.
  • Current pages title on the left
  • Breadcrumbs on the right
@toodooleedoo
toodooleedoo / create_cq_user.sh
Created February 2, 2015 02:38
AEM:CQ:Linux: Create a user from the command line.
curl -u admin:admin
'http://<<<CUT>>>:4502/libs/cq/security/authorizables/POST' -d 'status=browser' -d 'email=' -d
'familyName=asdf1012' -d 'givenName=asdf1012' -d 'intermediatePath=' -d 'rep:password=bwi123' -d
'rep:password=bwi123' -d 'rep:userId=asdf1012'
@toodooleedoo
toodooleedoo / delete_aem_file.sh
Created February 2, 2015 02:40
AEM:CQ:Linux: Delete any file from CRX with curl.
curl -u "admin:admin" "http://<<<CUT>>>:4505/crx/browser/delete_recursive.jsp?action=delete&Path=/apps/test/install/apps-src.jar"
@toodooleedoo
toodooleedoo / xpathloopplay.java
Last active June 18, 2017 01:52
#AEM #JAVA #JSP XPath Play
package org.main.test;
import javax.jcr.Node;
import javax.jcr.NodeIterator;
import javax.jcr.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.day.cq.wcm.api.Page;
import javax.jcr.query.QueryManager;
import javax.jcr.query.Query;
import javax.jcr.query.QueryResult;
@toodooleedoo
toodooleedoo / sitemap.html
Created February 1, 2015 22:59
AEM Sightly Sitemap
<template data-sly-template.sitemap="${ @ page}">
<ul data-sly-list="${page.listChildren}">
<li>${item.title}<span data-sly-call="${sitemap @ page=item}"></span>
</li>
</ul>
</template>
<span data-sly-call="${sitemap @ page=currentPage}"></span>