This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <settings> | |
| <servers> | |
| <server> | |
| <id>Custom-Artifacts</id> | |
| <username>${env.CUSTOM_ARTIFACTS_USERNAME}</username> | |
| <password>${env.CUSTOM_ARTIFACTS_PASSWORD}</password> | |
| </server> | |
| </servers> | |
| <profiles> | |
| <profile> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <repositories> | |
| <repository> | |
| <id>Custom-Artifacts</id> | |
| <url>https://myartifacts/maven/v1</url> | |
| <releases> | |
| <enabled>true</enabled> | |
| </releases> | |
| <snapshots> | |
| <enabled>true</enabled> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <repositories> | |
| <repository> | |
| <id>Custom-Artifacts</id> | |
| <url>https://myartifacts/maven/v1</url> | |
| <releases> | |
| <enabled>true</enabled> | |
| </releases> | |
| <snapshots> | |
| <enabled>true</enabled> | |
| </snapshots> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.day.cq.wcm.api.reference.ReferenceProvider; | |
| def providers = getServices(ReferenceProvider.class, null); | |
| def resource = resourceResolver.getResource("[PUT_A_PATH_HERE]"); | |
| providers.each{provider -> | |
| out.println(""); | |
| out.println(provider.class.toString()) | |
| long start = System.currentTimeMillis(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.sling.api.resource.Resource; | |
| import javax.jcr.*; | |
| import javax.jcr.version.*; | |
| start = System.currentTimeMillis(); | |
| limit = 5; | |
| cleaned = 0; | |
| versionManager = session.getWorkspace().getVersionManager(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "configurations": { | |
| "org.apache.sling.commons.crypto.internal.FilePasswordProvider~default": { | |
| "names": [ | |
| "default" | |
| ], | |
| "path": "/opt/a/path/on/the/local/server" | |
| }, | |
| "org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomIvGeneratorRegistrar~default": { | |
| "algorithm": "SHA1PRNG" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Run in the AEM Groovy Console or similar | |
| import org.osgi.framework.hooks.resolver.ResolverHookFactory; | |
| reference = bundleContext.getServiceReference(ResolverHookFactory.class); | |
| service = bundleContext.getService(reference); | |
| classLoader = service.getClass().getClassLoader(); | |
| Properties loadProperties(String propName) { | |
| def url = new URL(reference.getProperty(propName)) | |
| def conn = url.openConnection(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # The MIT License (MIT) | |
| # Copyright (c) 2022 Dan Klco | |
| # 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 |