Skip to content

Instantly share code, notes, and snippets.

View lklement's full-sized avatar

Lee Klement lklement

View GitHub Profile
@lklement
lklement / SlingProcessContentTest.java
Created April 7, 2017 02:40
Code to demonstrate AEM / Sling Server-Side JUnit Testing
package com.adobe.training.core.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import org.apache.sling.jcr.api.SlingRepository;
Create Websites and Components :: Copy / Paste Source
Lee Klement -- November 2016
-------------------------------------------------------
CHAPTER 11 :: LAB 11.2
Task – Enable the Responsive Emulator
Step 5
node name: com.day.cq.wcm.mobile.core.impl.MobileEmulatorProvider-training
node type: sling:OsgiConfig
Author Class Sample Content - Lee Klement - October 2016
Good Image Asset Searches
"Doe" "Mountain" "Running"
Classic Lorem Ipsum Filler Text:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam nec ante.
Vestibulum sapien. Proin quam. Etiam ultrices. Suspendisse in justo eu magna luctus suscipit. Sed lectus. Integer euismod lacus luctus magna. Integer id quam. Morbi mi. Quisque nis
Clip file for Extend and Customize AEM 6.2
Updated 170215
Chapter 3, Lab Activity 3, before Task 1 (Windows)
(on ReadyTech) Replace the values of these environment variables:
JAVA_HOME
C:\Program Files\Java\jdk1.8.0_91
Path
#Lee’s default lines:
alias ll="ls -al"
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
#Add for Advanced Developer & Maven:
export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}
#Nice Extras
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
@lklement
lklement / POM_additions.XML
Last active February 2, 2016 04:57
AdvDev 5.6.1, Ch 3: POM Dependencies
<!-- Sling API -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
<version>2.3.0</version>
<scope> provided</scope>
</dependency>
<!-- Java Servlet API -->
<dependency>
<%@ page import="com.day.cq.wcm.foundation.Image" %>
<%@include file="/libs/foundation/global.jsp"%>
<%
Image image = new Image(resource);
image.setSelector(".img");
image.draw(out);
%>
<br/>
# Each farm configures a set of load balanced renders (i.e. remote servers)
/farms
{
# First farm entry
/website
{
# Request headers that should be forwarded to the remote server.
/clientheaders
{
# Forward all request headers that are end-to-end. If you want
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@lklement
lklement / CURL_commands4AdminClassV6.txt
Last active May 10, 2017 19:23
CURL Commands for AEM Admin Class
CURL COMMANDS FOR ADMIN CLASS 6.2:
----------------------------------
system path after adding cURL:
C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%JAVA_HOME%\bin;C:\Program Files\curl
page 33
CHAPTER 5: Exercise 5.2 - Using Package Manager with cURL:
step 1. List commands: