Skip to content

Instantly share code, notes, and snippets.

@kuckmc01
kuckmc01 / mvn-archetype-aem-6
Created June 11, 2015 18:00
AEM 6.0 ready project using Maven Archetype and Terminal
#!/bin/bash
# Maven archetype that will create an AEM 6.0 ready project
# Might need to change permissions in order to run
# If all else fails, copy and paste everything below this line into the terminal
mvn archetype:generate \
-DarchetypeRepository=https://repo.adobe.com/nexus/content/groups/public/ \
-DarchetypeGroupId=com.adobe.granite.archetypes \
-DarchetypeArtifactId=aem-project-archetype \
-DarchetypeVersion=10 \
@kuckmc01
kuckmc01 / gist:363dbe4f7a64caa63daa
Created June 18, 2015 14:24
gitignore for java
######################
# Intellij
######################
.idea/
*.iml
*.iws
######################
# Maven
######################
@kuckmc01
kuckmc01 / gist:69ffe39f49d913d9b8342a64e56b9541
Last active September 28, 2016 02:31
Note to self: Useful Bash Profile
#If you forget where java folders are located you can find them by
# typing /usr/libexec/java_home -verbose in the terminal
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
#export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
#export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.5
export JETTY_HOME=/Users/sixdimensions/Downloads/jetty-distribution-9.3.3.v20150827
@kuckmc01
kuckmc01 / AEM-Touch-UI-Tab-Dialog-sample.xml
Last active April 23, 2021 22:20
AEM Touch UI Tab Dialog sample that has placeholders for adding tab content
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured"
jcr:title="Compare Products Services" sling:resourceType="cq/gui/components/authoring/dialog"
mode="edit" helpPath="style-guide.html#compare-rows-services">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<layout
---Reactor pom (add dependencies)
<dependency>
<groupId>com.adobe.acs</groupId>
<artifactId>acs-aem-commons-content</artifactId>
<version>3.2.4</version>
<type>content-package</type>
<classifier>min</classifier>
</dependency>
<dependency>
@kuckmc01
kuckmc01 / Nested-Multifield-Dialog.xml
Last active August 8, 2016 18:00
Nested Multifield in Touch UI Dialog using ACS Commons JSON Store
<rows jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/multifield"
class="full-width" fieldLabel="Rows">
<field jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fieldset"
acs-commons-nested="JSON_STORE" jcr:title="Row"
name="./compareRows">
<layout jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
method="absolute" />
@kuckmc01
kuckmc01 / Common-Touch-UI-Dialog-snippets.xml
Last active August 17, 2016 17:30
Common Touch UI Dialog XML snippets
<!-- checkbox -->
<checkbox
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
fieldDescription="Checking will add a check icon"
name="./checkbox"
text="Add Checkbox"
value="true"/>
<!-- simple fieldset no title -->
@kuckmc01
kuckmc01 / Simple-Post.js
Created August 31, 2016 15:13
AEM - Create a resource with sling post using ajax or curl
var samplePost = function(url,data){
console.log(data);
$.ajax({
url : url,
type: "POST",
data: data,
success: function (data,textStatus,xhr) {
console.log('success');
if(textStatus == 'success'){
console.log('ok')
@kuckmc01
kuckmc01 / gist:f43388b727c56e2be185363570baf3ce
Last active September 22, 2016 20:17
Dynamicially resource include in sightly
/** Single Resource **/
<sly data-sly-test.dynamicValue="${someValue}"/>
<sly data-sly-test.dynamiceName="${['my-resource-prefix-',dynamicValue ] @ join = ''}"/>
<sly data-sly-resource="${ @path=dynamicName, resourceType='/apps/my/component'}" />
/** Multiple Resources **/
<sly data-sly-list="${myList}">
<sly data-sly-test.dynamiceName="${['my-resource-prefix-', itemList.count ] @ join = ''}"/>
<sly data-sly-resource="${ @path=dynamicName, resourceType='/apps/my/component'}" />
</sly>
@kuckmc01
kuckmc01 / QueryBuilder.txt
Created September 29, 2016 02:19
AEM QueryBuilder is your friend ... or fiend!
How to ignore hideInNav property
group.1_property=jcr:content/hideInNav
group.1_property.operation=not