Skip to content

Instantly share code, notes, and snippets.

dfparker2002

Block or report user

Report or block dfparker2002

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dfparker2002
dfparker2002 / .nifi on docker with flow persistance part1.md
Created Jan 18, 2020 — forked from mannharleen/.nifi on docker with flow persistance part1.md
current status: not using docker-compose. need to run nifi, registry and jupyter notebook under once container
View .nifi on docker with flow persistance part1.md

sOME sETUP:

ubuntu@ip-10-201-97-84:~/nifi-persisted/nouser$ ls
getnifi.sh  nifi-1.8.0  nifi-1.8.0-bin.zip  nifi-toolkit-1.8.0  nifi-toolkit-1.8.0-bin.zip  scripts

ubuntu@ip-10-201-97-84:~/nifi-persisted/nouser$ ls scripts/
common.sh  start.sh           toolkit.sh                          update_login_providers.sh
secure.sh  update_cluster_state_management.sh

ubuntu@ip-10-201-97-84:~/nifi-persisted/nouser$ cat getnifi.sh
@dfparker2002
dfparker2002 / README.md
Created Jan 18, 2020 — forked from pawndev/README.md
Apache Nifi docker-compose local test
View README.md

docker compose nifi

To launch this project, simply use the docker-compose cli

docker-compose up

Wait a couple of seconds, then execute the next command :

View bitnami-bitnami.conf
# Default Virtual Host configuration.
<IfVersion < 2.3 >
NameVirtualHost *:443
</IfVersion>
# Default SSL Virtual Host configuration.
<IfModule !ssl_module>
LoadModule ssl_module modules/mod_ssl.so
@dfparker2002
dfparker2002 / ValueFormat.java
Created Jan 6, 2020
Break out sling value properties
View ValueFormat.java
// src: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/10d9603878e4d534144aad8196af804652de67d3/bundle/src/main/java/com/adobe/acs/commons/mcp/model/ValueFormat.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 / DuplicatesCounter.java
Created Dec 31, 2019
Demo different approaches to get count of duplicated elements in an arrayList
View DuplicatesCounter.java
// src: https://github.com/eugenp/tutorials/blob/85922e3a35f492cd8a6faba254f150ef98f7a588/core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/list/duplicatescounter/DuplicatesCounter.java
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* Demo different approaches to get count of duplicated elements in an
* arrayList
View showhidedialogfieldstabs.js
// src: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/206203e4a37e1a24c5558e5fed109ee8686eb82c/ui.apps/src/main/content/jcr_root/apps/acs-commons/touchui-widgets/showhidedialogfields/source/showhidedialogfieldstabs.js
/**
* Extension to the standard dropdown/select and checkbox component. It enables hidding/unhidding of multiple dialog fields
* and dialog tabs based on the selection made in the dropdown/select or on checkbox check or their combination.
*
* How to use:
* - add the empty property acs-cq-dialog-dropdown-checkbox-showhide to the dropdown/select or checkbox element
* - add the data attribute acs-cq-dialog-dropdown-checkbox-showhide-target to the dropdown/select or checkbox element,
* value should be the selector, usually a specific class name, to find all possible target elements that can be shown/hidden.
* - add the target class to each target component that can be shown/hidden
@dfparker2002
dfparker2002 / jquery-es6-example.md
Created Nov 20, 2019 — forked from mgol/jquery-es6-example.md
jQuery ES6 modules example usage
View jquery-es6-example.md

jQuery source is now authored using ES6 modules. It's possible to use them directly in the browser without any build process.

To test it locally, first clone the jQuery repository:

git clone git@github.com:jquery/jquery.git

Then, write the following index.html file:

@dfparker2002
dfparker2002 / microservices.md
Created Nov 15, 2019 — forked from remibantos/microservices.md
Microservices - Cheat sheet
View microservices.md

Microservices - Cheat sheet

Based on Microservices presentation by Martin Fowler recorded at GOTO Berlin 2014.

Common caracteristics

  1. Components (= independently upgradable, replaçable) communicating through services (instead of libs for monoliths)
  2. Organized around business capabilities
  3. Smart endpoints and dumb pipes. Routing logic is managed by end-points
  4. Decentralized data management. Each Microservice manages its own data
View ThrowableClassDemo.java
// src: https://github.com/eugenp/tutorials/blob/f9259fce764200d1e12d7b970d01feb8d9267edb/core-java-modules/core-java-exceptions/src/main/java/com/baeldung/exceptions/catchingthrowable/ThrowableClassDemo.java
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
public class ThrowableClassDemo {
class CapacityException extends Exception {
CapacityException(String message) {
super(message);
@dfparker2002
dfparker2002 / RenditionMetadataWorkflowProcess.java
Created Oct 15, 2019
Sample rendition metadata Workflow Process
View RenditionMetadataWorkflowProcess.java
// src: https://github.com/wcm-io/wcm-io-handler/blob/cd2d552447ca4e60eb7a51bba6dc6406fa402a9f/media/src/main/java/io/wcm/handler/mediasource/dam/impl/metadata/RenditionMetadataWorkflowProcess.java
import static com.day.cq.dam.api.DamConstants.NT_DAM_ASSET;
import java.util.List;
import java.util.concurrent.locks.Lock;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.jetbrains.annotations.NotNull;
import org.osgi.service.component.annotations.Component;
You can’t perform that action at this time.