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 / DynamicSelectDataSourceTest.java
Created Jan 16, 2019
DynamicSelectDataSourceTest (mock of query & querybuilder)
View DynamicSelectDataSourceTest.java
/*
src: https://github.com/joerghoh/acs-aem-commons/blob/57cbf3048de3ab02a00e8a54f496bc1bbcd8c7eb/bundle/src/test/java/com/adobe/acs/commons/reports/internal/datasources/DynamicSelectDataSourceTest.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
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active Oct 5, 2019
A Gentle Introduction to Prepack, Part 1
View prepack-gentle-intro-1.md

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
View CustomModel.java
import javax.inject.Inject;
import javax.inject.Named;
import javax.jcr.Session;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.models.annotations.Default;
import org.apache.sling.models.annotations.DefaultInjectionStrategy;
import org.apache.sling.models.annotations.Model;
View DropDownPropertyConfig.java
@Property(label="Select One Value",name="label", options={
@PropertyOption(name="title1",value="value1"),
@PropertyOption(name="title2",value="value2")
},value="defaultvalue", description="Some Description")
private static final String PROPERTY_SCHEDULER_DATASOURCE = "label";
private String label;
//And then
@Activate
protected void activate(final Map<String, Object> config) {
this.lebel = PropertiesUtil.toString(config.get("label"), "some_default_value");
View cqmgr
#!/bin/bash
# a script to make it easier for developers to start multiple CQ instances
# Default Settings
version=5.6.1
root=~/dev/cq
publish=
debug="true"
gui=-gui
@dfparker2002
dfparker2002 / aem6_deps.txt
Last active Apr 3, 2016 — forked from frieder/aem6_deps.txt
AEM6 Dependencies
View aem6_deps.txt
To include dependencies for Adobe Experience Manager 6 (AEM6) one can use one of the following
approaches.
a) Use a single dependency that will include other dependencies through transitive dependencies.
Please note that unlike the 2nd approach this approach will not include all dependencies.
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-api</artifactId>
<version>6.0.0.1</version>
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active Oct 10, 2019
Most VPN Services are Terrible
View vpn_psk_bingo.md

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@skroah
skroah / gist:9c22697521626c7b388b
Last active Oct 1, 2019
Reactive Systems Design
View gist:9c22697521626c7b388b

##Reactive System Design Links

#Articles and Papers

View gist:5703092
Assuming the base URL to be this (need to edit to fit yours):
http://cqauthor1.company.com:4502
SEARCH
Search UI:
/crx/explorer/ui/search.jsp?Path=&Query=
View Nested Paragraph Systems in CQ5
Set up your file structure for the innerParsys component:
innerParsys
-> parsys
-> new
- _cq_editConfig.xml
- .content.xml
- _cq_editConfig.xml
- .content.xml
- parsys.jsp
You can’t perform that action at this time.