Skip to content

Instantly share code, notes, and snippets.

const hero = document.querySelector('.hero');
console.log(hero);
* {
box-sizing: border-box;
}
body {
background: #EFEFEF;
font-family: 'adobe clean';
margin: 0;
}
mountpoints:
/: https://drive.google.com/drive/u/0/folders/1aHSa47OaZZlPG8sQGTM9Zfwhd8jctBWF
/**
* Helix Nav
*
* A low-touch client-side navigation function to inject
* /nav.html content (if present) into a vanilla Helix Page.
*
* How to use
*
* 1. Add a "nav" doc to the root of your content folder
* 2. Add this script to your page.
package org.millr.slick.auth;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.resource.ResourceResolverFactory;
@auniverseaway
auniverseaway / flexShowHide.js
Created April 23, 2020 22:44
A dead simple parsys show/hide for Flex Container
/*
* Copyright 2020 Adobe
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
// Current Generic GA Event Implementation
if (window.ga && dataLayer){
dataLayer.push({
'event': event,
'eventCategory':eventCategory,
'eventAction': eventAction,
'eventLabel':eventLabel
});
}
@auniverseaway
auniverseaway / _cq_icon.svg
Last active April 29, 2019 19:33
A sample AEM Icon - Modal
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@auniverseaway
auniverseaway / gist:21800b9a7848b2bf880c
Last active February 6, 2019 01:36
Maven AEM Archetype 10 install command

Adobe's docs aren't quite updated to reflect the changes in the archetype. You can get the new hotness by using this command:

mvn archetype:generate \
-DarchetypeRepository=https://repo.adobe.com/nexus/content/groups/public/ \
-DarchetypeGroupId=com.adobe.granite.archetypes \
-DarchetypeArtifactId=aem-project-archetype \
-DarchetypeVersion=10 \
-DgroupId=my-group-id \
-DartifactId=myproject \

-Dversion=1.0-SNAPSHOT \

@auniverseaway
auniverseaway / aem-compact-script.sh
Last active November 26, 2018 09:47
AEM Compaction Script
#!/bin/bash
now="$(date +'%d-%m-%Y')"
logfile="compact-$now.log"
installfolder="/data/aem"
aemfolder="$installfolder/crx-quickstart"
oakrun="$installfolder/help/oak-run-1.0.18.jar"
## Shutdown AEM
printf "Shutting down AEM.\n"
$aemfolder/bin/stop