Skip to content

Instantly share code, notes, and snippets.

View klcodanr's full-sized avatar

Dan Klco klcodanr

View GitHub Profile
@klcodanr
klcodanr / settings.xml
Last active July 8, 2020 22:05
Maven settings.xml for Cloud Manager Private Artifact repositories
<settings>
<servers>
<server>
<id>Custom-Artifacts</id>
<username>${env.CUSTOM_ARTIFACTS_USERNAME}</username>
<password>${env.CUSTOM_ARTIFACTS_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
@klcodanr
klcodanr / RegisterRepoInits.java
Created June 17, 2020 19:14
Component to Register org.apache.sling.jcr.repoinit.RepositoryInitializer Configurations using the Bundle URLs
package com.company;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
function svg2img(){
var svg = document.querySelector('svg');
var xml = new XMLSerializer().serializeToString(svg);
var svg64 = btoa(xml);
var b64start = 'data:image/svg+xml;base64,';
var image64 = b64start + svg64;
return image64;
};
var img = document.createElement('img');
img.src = svg2img();
<%--
Copyright 2019 Perficient Digital
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
@klcodanr
klcodanr / sc-renderings.js
Created July 16, 2019 03:34
A simple script to dump out the renderings in a Sitecore 8 / 9 instance. To use, login to the instance, expand the nodes under renderings you want to log and then execute this script in the console.
var renderings = [];
var getName = function(el){
return el.querySelector('a span').innerText;
}
var isFolder = function(el){
return el.querySelector('a span img').src.indexOf('folder') !== -1;
}
var traverseTree = function(el, parentPath){
parentPath = parentPath+"/"+getName(el);
let children = el.children[3];
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/xenial64'...
Progress: 10%
Progress: 90%
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
==> default: A newer version of the box 'ubuntu/xenial64' for provider 'virtualbox' is
==> default: available! You currently have version '20180329.0.0'. The latest is version
==> default: '20180410.0.0'. Run `vagrant box update` to update.
<baseline version="1.0.0" vendor="The Apache Software Foundation" vendorURL="http://www.apache.org/" generator="Apache Felix Maven Bundle Plugin" generatorURL="http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html" analyzer="Bnd" analyzerURL="http://www.aqute.biz/Bnd/Bnd" generatedOn="2017-05-18T14:59Z" bundleName="org.apache.sling.scripting.jsp.taglib" currentVersion="2.2.7-SNAPSHOT" previousVersion="2.2.6-53compat">
<package name="org.apache.sling.scripting.jsp.taglib" delta="minor">
<mismatch>true</mismatch>
<newerVersion>2.2.0</newerVersion>
<olderVersion>2.2.0</olderVersion>
<suggestedVersion>2.3.0</suggestedVersion>
<error>Version increase required</error>
<attributes>
<version>2.2.0</version>
<uses>javax.servlet,javax.servlet.jsp,javax.servlet.jsp.tagext,org.apache.sling.api.adapter,org.apache.sling.api.resource</uses>
<baseline version="1.0.0" vendor="The Apache Software Foundation" vendorURL="http://www.apache.org/" generator="Apache Felix Maven Bundle Plugin" generatorURL="http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html" analyzer="Bnd" analyzerURL="http://www.aqute.biz/Bnd/Bnd" generatedOn="2017-05-18T14:59Z" bundleName="org.apache.sling.scripting.jsp.taglib" currentVersion="2.2.7-SNAPSHOT" previousVersion="2.2.6-53compat">
<package name="org.apache.sling.scripting.jsp.taglib" delta="minor">
<mismatch>true</mismatch>
<newerVersion>2.2.0</newerVersion>
<olderVersion>2.2.0</olderVersion>
<suggestedVersion>2.3.0</suggestedVersion>
<error>Version increase required</error>
<attributes>
<version>2.2.0</version>
<uses>javax.servlet,javax.servlet.jsp,javax.servlet.jsp.tagext,org.apache.sling.api.adapter,org.apache.sling.api.resource</uses>
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Sling Integration Tests 1.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-java) @ org.apache.sling.launchpad.integration-tests ---
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (set-bundle-required-execution-environment) @ org.apache.sling.launchpad.integration-tests ---
[INFO] Executing tasks
This file has been truncated, but you can view the full file.
16.02.2017 23:29:48.695 *INFO* [FelixStartLevel] org.apache.sling.commons.log.logback.internal.Activator LogbackManager initialized at bundle startup
16.02.2017 23:29:48.700 *INFO* [FelixStartLevel] org.apache.sling.commons.logservice Service [org.apache.sling.commons.logservice.internal.LogServiceFactory,18, [org.osgi.service.log.LogService]] ServiceEvent REGISTERED
16.02.2017 23:29:48.700 *INFO* [FelixStartLevel] org.apache.sling.commons.logservice Service [org.apache.sling.commons.logservice.internal.LogReaderServiceFactory,19, [org.osgi.service.log.LogReaderService]] ServiceEvent REGISTERED
16.02.2017 23:29:48.701 *INFO* [FelixStartLevel] org.apache.sling.commons.logservice BundleEvent STARTED
16.02.2017 23:29:48.704 *INFO* [FelixStartLevel] org.apache.sling.installer.core BundleEvent RESOLVED
16.02.2017 23:29:48.704 *INFO* [FelixStartLevel] org.apache.sling.installer.core BundleEvent STARTING
16.02.2017 23:29:48.717 *INFO* [FelixStartLevel] org.apache.sling.installer.core Service [Apache Sling Bundle Ins