Skip to content

Instantly share code, notes, and snippets.


Roger Blanton rogerblanton

View GitHub Profile
rogerblanton / init-fix.jsp
Created Jul 23, 2014
When using sling to include CQ pages inside another CQ page, the init.jsp script will try to fire multiple times and the sidekick rendering will not work properly, instead check to see if the page you are reviewing is the actual page and use init.jsp to render sidekick, or if you are viewing it embedded in another page, disabled the init.jsp call
View init-fix.jsp
<%@include file="/myapp/includes/base-global.jsp" %>
<!-- Load sidekick only when viewing page on its own -->
<% if(currentPage.getPath().equals(resourcePage.getPath())) { %>
<cq:include script="/libs/wcm/core/components/init/init.jsp"/>
<% } %>
View CQ5 Curl Commands
Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
rogerblanton / aem-templates-intellij.xml
Last active Aug 29, 2015
AEM IntelliJ Live Templates
View aem-templates-intellij.xml
<?xml version="1.0" encoding="UTF-8"?>
<templateSet group="Adobe AEM">
<template name="cqTemplate" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;jcr:root xmlns:sling=&quot;; xmlns:cq=&quot;; xmlns:jcr=&quot;;&#10; jcr:description=&quot;$DESCRIPTION$&quot;&#10; jcr:primaryType=&quot;cq:Template&quot;&#10; jcr:title=&quot;$TITLE$&quot;&#10; allowedPaths=&quot;[$ALLOWED_PATHS$]&quot;&#10; ranking=&quot;{Long}$RANKING$&quot;&gt;&#10; &lt;jcr:content&#10; cq:designPath=&quot;$DESIGN_PATH$&quot;&#10; jcr:primaryType=&quot;cq:PageContent&quot;&#10; sling:resourceType=&quot;$RESOURCE_TYPE$&quot;&gt;&#10; &lt;/jcr:content&gt;&#10;&lt;/jcr:root&gt;&#10;$END$" description="Create template for Adobe AEM" toReformat="false" toShortenFQNames="true">
<variable name="DESCRIPTION" expression="" defaultValue="&quot;Enter the description&quot
View brackets.json
"fonts.fontSize": "14px",
"fonts.fontFamily": "'Monaco'",
"linting.collapsed": true,
"useTabChar": true,
"tabSize": 2,
"themes.theme": "dark_soda_theme"
rogerblanton /
Last active May 26, 2016
Change the default start page of AEM 5.6+ from touch ui to classic interface
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="" xmlns:jcr=""
rogerblanton /
Last active May 26, 2016
Share Count APIs

Share Counts



rogerblanton / .bash_aliases
Last active May 28, 2016
Make Terminal Better
View .bash_aliases
alias reloadpr="source ~/.profile"
alias cp="cp -iv"
alias mv="mv -iv"
alias ls='ls -GFh'
alias ll='ls -FGhlAp'
# Directory Navigation
alias sites='cd ~/Sites'
alias ..="cd ../"
alias ...="cd ../../"
package com.adobe.example;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
import org.apache.felix.scr.annotations.Property;
rogerblanton / color-picker-rte-plugin.js
Created Jun 15, 2018
Sample Color Picker Plugin that uses an Iframe to render a dialog instead of native Coral UI fields.
View color-picker-rte-plugin.js
(function($, CUI){
var GROUP = "experience-aem",
TCP_DIALOG = "eaemTouchUIColorPickerDialog",
REQUESTER = "requester",
PICKER_URL = "/apps/eaem-touchui-dialog-rte-color-picker/color-picker-popover/cq:dialog.html";
rogerblanton / table-summary-rte.js
Last active Jun 15, 2018
A sample of how to modify an existing RTE Plugin
View table-summary-rte.js
(function ($) {
"use strict";
var _ = window._,
Class = window.Class,
CUI = window.CUI,
EAEM_TABLE = null,
COLUMN_CONTAINER = ".rte-dialog-columnContainer",
SUMMARY_SEL = ".rte-dialog--tableprops textarea[data-type=\"summary\"]",
SUMMARY_HTML = '<div class="rte-dialog-columnContainer">'
You can’t perform that action at this time.