Skip to content

Instantly share code, notes, and snippets.

@bfosterscripps
bfosterscripps / brightspot-build.log
Created March 7, 2017 17:53
`mvn clean package` output for brightspot-cms
✓ brightspot-cms (master)$ ls
LICENSE README.md archetypes db hunspell pom.xml tool-ui
✓ brightspot-cms (master)$ mvn clean package
[INFO] Scanning for projects...
Downloading: https://artifactory.psdops.com/public/com/psddev/dari-parent/3.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://artifactory.psdops.com/public/com/psddev/dari-parent/3.3-SNAPSHOT/maven-metadata.xml (788 B at 1.0 KB/sec)
Downloading: https://artifactory.psdops.com/public/com/psddev/dari-grandparent/3.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://artifactory.psdops.com/public/com/psddev/dari-grandparent/3.3-SNAPSHOT/maven-metadata.xml (793 B at 15.2 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
@bfosterscripps
bfosterscripps / toggle-touchui-author-bookmarklet.js
Last active August 1, 2018 17:54
Toggle between editing in Touch UI and preview mode on AEM author pages.
(function() {
var newUrl = '',
prevUrl = document.URL,
isWcmmodeDisabled = /wcmmode=disabled/.test(prevUrl);
if (/author\./.test(prevUrl)) {
if (/^.*?\/editor.html/.test(prevUrl)) {
newUrl = prevUrl.replace(/\/editor.html/, '');
if (!isWcmmodeDisabled) {
newUrl = newUrl + ((/\.html\?/.test(newUrl)) ? '&' : '?') + 'wcmmode=disabled';
}
@bfosterscripps
bfosterscripps / cq-package-manager.sh
Last active August 29, 2015 14:26
Create and install packages based on a list of filters and a directory full of packages.
#!/bin/bash
# Create a package with a given set of root paths
# HTA-1305
declare -a filterPaths=(
/content/dam/images/hgtv/fullset/2010/5/27/0/CI-Jamie-Durie_outdoor-room-LA-horjd107_s4x3.jpg
/content/dam/images/hgtv/fullset/2013/6/11/1/Original_Marianne-Canada-Crafternoon-Boat-Bag-Step1_h.jpg
/content/dam/images/hgtv/fullset/2015/1/0/RX-HGMAG026_Felt-DIY-075-a-4x3.jpg
/content/dam/images/hgtv/fullset/2012/2/1/0/CI-Thibaut_Barrowgate-living-room-wallpaper-settee_s3x4.jpg
@bfosterscripps
bfosterscripps / image-dependencies.js
Last active August 29, 2015 14:26
Bookmarklet to get unique CQ image paths to develop filters for package dependencies.
(function(){
function createTextarea(){
var output = document.createElement('textarea'),
yOffset = window.pageYOffset + 100;
document.body.appendChild(output);
output.style.zIndex = 9999;
output.style.width = '550px';
output.style.height = '300px';
output.style.position = 'absolute';
output.style.background = 'white';
@bfosterscripps
bfosterscripps / upload-file-to-jcr.sh
Created July 14, 2015 19:36
Bash script to upload files to CQ java content repository
#!/bin/bash
# use by passing path to the file you wish to upload as first parameter,
# and passing JCR path (including filename and extension) as second parameter
function pause() {
rc=$?
if [[ $rc != 0 ]]; then
read -p "Press [Enter] to continue, there are errors above."