Skip to content

Instantly share code, notes, and snippets.

<alignment jcr:primaryType="nt:unstructured"
name="./alignChildren"
fieldLabel="Alignment of components"
required="{Boolean}true"
selectionMode="single"
sling:resourceType="granite/ui/components/coral/foundation/form/buttongroup">
<items jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured"
name="./default"
src: https://raw.githubusercontent.com/Adobe-Consulting-Services/acs-aem-commons/f3f6e9e164edcfb7abf16063e9cd5c3691388669/bundle/src/test/java/com/adobe/acs/commons/wcm/properties/shared/impl/SharedComponentPropertiesBindingsValuesProviderTest.java
/*
* #%L
* ACS AEM Commons Bundle
* %%
* Copyright (C) 2017 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
@dfparker2002
dfparker2002 / Staff.java
Created October 15, 2021 17:43
Java Currying example
// src article https://www.baeldung.com/java-currying
//src: https://github.com/iluwatar/java-design-patterns/blob/367b870f5b5b63be2c0b27158c97911e015f1c93/currying/src/main/java/com/iluwatar/currying/Staff.java
package com.iluwatar.currying;
import java.time.LocalDate;
import java.util.Objects;
import java.util.function.Function;
public class Staff {
@dfparker2002
dfparker2002 / MontitorMain.java
Created October 15, 2021 17:39
Monitor Pattern
// src: https://raw.githubusercontent.com/iluwatar/java-design-patterns/539b41ae65a6cb7c74bffdd066a33a85ea2de4ce/monitor/src/main/java/com/iluwatar/monitor/Main.java
/*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* 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

How to Sign and Release to The Central Repository with GitHub Actions

GitHub allows automated builds using GitHub Actions. A commonly asked question is how to release artifacts (packaged Java jars) built by Maven and Gradle to The Central Repository. The GitHub Actions documentation provides only part of the answer.

So, first, configure your Maven project for staging artifacts to The Central Repository, by reading through Configuring Your Project for Deployment and following those steps. Please make sure that the maven-gpg-plugin is configured to prevent gpg from using PIN entry programs, as follows:

<configuration>
  <gpgArguments>
      <arg>--pinentry-mode</arg>
 loopback
@dfparker2002
dfparker2002 / console-2.html
Created September 4, 2021 07:17 — forked from prof3ssorSt3v3/console-2.html
Demo on how to use the monitorEvents feature in Chrome Dev Tools
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Console - Monitor Events</title>
</head>
<body>
<header>
<h1>Using the Console to Monitor Events</h1>
@dfparker2002
dfparker2002 / jq-cheetsheet.md
Created August 17, 2021 21:19 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@dfparker2002
dfparker2002 / 2019-https-localhost.md
Created August 2, 2021 07:33 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@dfparker2002
dfparker2002 / MapEntryEfficiencyExample.java
Created January 18, 2021 05:02
Efficient use of map (via Map.Entry) to find/retrieve value
// src: https://github.com/eugenp/tutorials/blob/ad2a34dc4aad84d249cfe38efe43f93ec7af9486/java-collections-maps-3/src/main/java/com/baeldung/map/entry/MapEntryEfficiencyExample.java
import java.util.HashMap;
import java.util.Map;
public class MapEntryEfficiencyExample {
public static void main(String[] args) {
MapEntryEfficiencyExample mapEntryEfficiencyExample = new MapEntryEfficiencyExample();
Map<Integer, String> bookMap = new HashMap<>();
bookMap.put(1, "Clean Code");
@dfparker2002
dfparker2002 / JcrQueryLibrary.md
Created November 5, 2020 21:29 — forked from neozilon/JcrQueryLibrary.md
Some useful JCR queries (XPATH, SQL2) for AEM/CQ development.

SQL2

All nodes with a specific name

SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND NAME() = "nodeName"

All pages below content path