Skip to content

Instantly share code, notes, and snippets.

@kuckmc01
kuckmc01 / gist:363dbe4f7a64caa63daa
Created June 18, 2015 14:24
gitignore for java
######################
# Intellij
######################
.idea/
*.iml
*.iws
######################
# Maven
######################
@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 / 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 / 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
vlt --credentials admin:admin co http://localhost:4502/crx/-/jcr:root/mypage
@kuckmc01
kuckmc01 / touchuinote.txt
Created January 11, 2017 20:25
Touch UI Note
<note
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/note"
note="NoteText" />
${request.requestParameterMap['test'][0].toString}