Skip to content

Instantly share code, notes, and snippets.

@dfparker2002
dfparker2002 / gist:03aa1257a5f642569478
Created March 28, 2016 10:22 — forked from fajrif/gist:1265203
git clone specific tag
git clone <repo-address>
git tag -l
git checkout <tag-name>
git branch -D master
git checkout -b master
@dfparker2002
dfparker2002 / aem6_deps.txt
Last active April 3, 2016 10:32
AEM6 Dependencies
To include dependencies for Adobe Experience Manager 6 (AEM6) one can use one of the following
approaches.
a) Use a single dependency that will include other dependencies through transitive dependencies.
Please note that unlike the 2nd approach this approach will not include all dependencies.
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-api</artifactId>
<version>6.0.0.1</version>

Offline Oak compaction with debug logging:

  1. Install the latest Oak hotfix to your AEM instance:
  1. Download the oak-run version matching your oak version: https://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run/
  2. Upload the oak-run jar file to your server
  3. Create a file logback-compaction.xml (on the server in the same folder as the oak-run jar)
@dfparker2002
dfparker2002 / remove-vlt.sh
Created May 14, 2016 19:13 — forked from thomashartm/remove-vlt.sh
Removes .vlt files from the current directory and all subdirectories
#!/bin/bash
find ./ -name ".vlt" | xargs rm -Rf
@dfparker2002
dfparker2002 / parse xml sed script
Created May 14, 2016 19:17 — forked from thomashartm/parse xml sed script
Parse xml elements from settings.xml into shell variables
username=$(grep -o '<username>.*</username>' ~/.m2/settings.xml | sed 's/\(<username>\)//g' | sed 's/\(<\/username>\)//g')
password=$(grep -o '<password>.*</password>' ~/.m2/settings.xml | sed 's/\(<password>\)//g' | sed 's/\(<\/password>\)//g')
@dfparker2002
dfparker2002 / cq5 startup script
Created May 15, 2016 06:31
Startup script for Adobe CQ 5.6, tested on CentOS 6.5
+-----------------------+
| /etc/rc.d/init.d/cq5 |
+-----------------------+
#!/bin/bash
#
# cq5 Startup script for Adobe AEM/CQ5
#
# chkconfig: 345 80 20
# description: Startup script for Adobe AEM/CQ5
#!/bin/bash
# a script to make it easier for developers to start multiple CQ instances
# Default Settings
version=5.6.1
root=~/dev/cq
publish=
debug="true"
gui=-gui
@dfparker2002
dfparker2002 / JcrSparseTest.java
Created May 20, 2016 04:39 — forked from thecarlhall/JcrSparseTest.java
Unit Test Mocks for JCR, Sparse Sessions
private javax.jcr.Session jcrSession;
private org.sakaiproject.nakamura.api.lite.Repository repository;
private org.sakaiproject.nakamura.api.lite.Session session;
// Create an in-memory repository to work with
repository = new BaseMemoryRepository().getRepository();
// mock a jcr session but also include SessionAdaptable for easier mocking to a sparse session
jcrSession = mock(javax.jcr.Session.class, Mockito.withSettings().extraInterfaces(SessionAdaptable.class));
@dfparker2002
dfparker2002 / README.md
Created May 26, 2016 01:26 — forked from hofmannsven/README.md
My simply Git Cheatsheet