Skip to content

Instantly share code, notes, and snippets.

View hemanth415's full-sized avatar

Hemanth Kumar hemanth415

  • Raleigh, North Carolina
View GitHub Profile
@hemanth415
hemanth415 / cf-errors.md
Created April 20, 2023 08:36
Content Fragment Modal Editing Errors
  • Unable load CF modal editor with the error, The query read or traversed more than 100000 nodes.
    Create index for the query mentioned, using http://oakutils.appspot.com/generate/index
  • Modal not loading all the fields that were added previously, due to the error\
20.04.2023 13:47:53.780 *ERROR* [[0:0:0:0:0:0:0:1] [1681978673159] GET /mnt/overlay/dam/cfm/models/editor/content/editor.html/conf/project/settings/dam/cfm/models/location HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
org.apache.sling.api.request.TooManyCallsException: /libs/granite/ui/components/coral/foundation/form/field/field.jsp
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:558) [org.apache.sling.engine:2.7.10.B0002]
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) [org.apache.sling.engine:2.7.10.B0002]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterC
@hemanth415
hemanth415 / clear-stash.sh
Last active April 17, 2023 12:42
Iteratively delete Stashed items
for i in $(seq 1 15); do git stash drop stash@{11}; done
@hemanth415
hemanth415 / connect-github-sourceTree.md
Created November 5, 2020 21:40
Connect to Github from Atlassian SourceTree

Create a Personal Access Token from https://github.com/settings/tokens and use this token as Password while add the Github account information in SourceTree.

SourceTree:

  • Go to Account and select Github.
  • Use Authentication Type as "Basic" and add your Github username and Password (Personal Access Token)
  • HTTPS is to be used Protocol
@hemanth415
hemanth415 / replication-event.md
Created June 1, 2020 19:54
Replication Event not getting caught.

We have a use case to catch the replication event of a resource in the authoring and perform some manipulation on it. We are leveraging org.osgi.service.event.EventHandler to catch this event. We have observed, occasionally this event is not getting caught. We tried to troubleshoot the issue and found the cause of the issue to be the event getting blacklisted.

Similar to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/custom-replication-event-handler-not-triggering-intermittently/qaq-p/279325

Updating the org.apache.felix.eventadmin.impl.EventAdmin fixed our issue. But as per the below documentation. This OSGi configuration marked as deprecated.

https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/javadoc/deprecated-configurations.html

@hemanth415
hemanth415 / ssh-keygen.md
Last active July 23, 2021 21:46
ssh-keygen does not create RSA private key on MAC OS.

Private Key Format when using ssh-keygen -t rsa -b 4096 -f ~/.ssh/check

-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1j
...
-----END OPENSSH PRIVATE KEY-----

This format is not accepted some of applications.

@hemanth415
hemanth415 / json-transformation.md
Last active November 12, 2019 18:20
Some of the help Transformation tools while dealing with JSON
@hemanth415
hemanth415 / docker-compose.yml
Created October 25, 2019 14:15
Zipkin with RabbitMQ
version: '2'
services:
zipkin:
image: openzipkin/zipkin
container_name: zipkin
environment:
- STORAGE_TYPE=mem
- RABBIT_URI=amqp://localhost
ports:
- 9411:9411
@hemanth415
hemanth415 / LinuxCommands.md
Last active May 16, 2019 15:28
Helpful Linux commands for debugging logs.
  • List directories only:
    $ ls -d */
  • List hidded files only:
    $ ls -a
  • Linux search for word and show entire line
    $ grep --after-context=15 --before-context=1 'Exception' error.log
@hemanth415
hemanth415 / PageAssetReferencesScript.java
Created May 15, 2019 19:29
AEM Script to list out all page asset references [V2]
package custom;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.databind.node.ValueNode;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
@hemanth415
hemanth415 / packagemanager-logging.md
Last active April 16, 2019 14:23
Package Manager logging