Skip to content

Instantly share code, notes, and snippets.

@knennigtri
knennigtri / mongo-init.sh
Last active April 28, 2017 05:23
Initializa and start a Mongo replset
##
# This script initializes and starts a Mongo replset on your local machine. All servers
# bind to your hostname for the replset. This script assumes the following folder structure
#
# + Top level folder
# - mongo-demo.sh
# + MONGODB_PATH[i]
# + db
# + logs
#
@knennigtri
knennigtri / cp-install.sh
Created July 1, 2016 21:41
Upload and Install a content package via cURL
##
# This is a script to upload and install a list of packages to an AEM server. All Packages
# must be located in PACKAGE_LOCATION and then listed in the PACKAGES array. The package
# file name must be the same as the package name.
#
# Author:
# knennig213@gmail.com
# o--o
# Version 1.0.2
#
@knennigtri
knennigtri / instance-creator.scpt
Last active April 28, 2017 05:23
AEM Instance Creator. A Wizard to create AEM instance with pre-installed content packages
--This wizard allows you to configure an AEM instance with pre installed packages
--Make sure the "Instances" folder, "Content Packages" folder and license.properties file are siblings of this script
--Instances - Put any AEM instances you want to use with the tool in this folder
--Content Packages - Put any content packages you want installed on the AEM instance in this folder
set creatorPath to POSIX path of ((path to me as text) & "::")
--Put all AEM instances in "./Instances"
--Put all Content Packages in "./Content Packages"
mongouri="mongodb://<hostname-or-IP>:<port#>"
db="OakAuthor"
cache="256"
nodeCachePercentage="25"
prevDocCachePercentage="4"
childrenCachePercentage="10"
diffCachePercentage="5"
docChildrenCachePercentage="3"
cacheSegmentCount="16"
cacheStackMoveDistance="16"
@knennigtri
knennigtri / createUsers.sh
Last active March 26, 2019 17:15
Autocreation of AEM users
#This script only creates users and a single group. This does not set permissions or put the users into the group.
#Once this script is run, go to /useradmin and add all created AEM users to the created AEM group
#Open the created group and add Groups: Authors, DAM-users, tag-administrators, project-administrators, template-authors, workflow-administrators, /libs/cq/core/content/nav/personalization (full permissions)
#Number of AEM Accounts to be created
STUDENTS=13
#Name of group being created
GROUP=mygroup
#Name of AEM users
@knennigtri
knennigtri / .gitignore
Created March 20, 2017 18:20
AEM Project gitignore for Eclipse
*.vlt
*.vlt-sync-config.properties
*.vlt-sync.log
*.project
*.DS_Store
*.brackets.json
*.MF
*.jar
@knennigtri
knennigtri / dispatcher.any
Last active February 24, 2023 10:03
We.Retail dispatcher.any and httpd.conf
#To find the We.Retail Specific changes, search for "We.Retail Alert"
# 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
@knennigtri
knennigtri / jcr-locations.md
Last active May 8, 2023 09:15
Useful JCR Locations for AEM Templates and components
@knennigtri
knennigtri / UploadCPScript.sh
Created September 6, 2019 13:00
content package install script using AEM package manager
#!/bin/bash
dir="internal"
for file in `find $dir -type f`
do
filename=`basename $file`;
echo $file
curl -u admin:admin -F package=@$file http://localhost:4502/crx/packmgr/service/.json/?cmd=upload
done
dir="external"
@knennigtri
knennigtri / aemfed.sh
Created September 6, 2019 13:01
Conntect AEMFED tool to the jcr_root of a maven project for AEM sync
#!/bin/bash -x
aemfed -t http://admin:admin@localhost:4522 -w ui.apps/src/main/content/jcr_root/