Skip to content

Instantly share code, notes, and snippets.

View jayankandathil's full-sized avatar

Jayan Kandathil jayankandathil

View GitHub Profile
@jayankandathil
jayankandathil / SlingJMXAllQueues.groovy
Last active August 4, 2022 10:41
Groovy script that prints out JMX Metrics for [Adobe Experience Manager] [Apache Sling] [AllQueues]
// Author : Jayan Kandathil
// Last Updated : May 19, 2017
// Version : 0.1
import java.lang.management.*
import javax.management.ObjectName
import javax.management.remote.JMXConnectorFactory as JmxFactory
import javax.management.remote.JMXServiceURL as JmxUrl
import java.text.DecimalFormat;
@jayankandathil
jayankandathil / mongod34.conf
Last active July 8, 2017 14:26
MongoDB 3.4 configuration on Windows for the WiredTiger storage engine for AEM 6.2 DEV environments
net:
http:
RESTInterfaceEnabled: true
enabled: true
port: 27017
processManagement:
pidFilePath: C:\Programs\MongoDB\Server\3.4\mongod.pid
storage:
engine: wiredTiger
dbPath: C:\Programs\MongoDB\Server\3.4\data
@jayankandathil
jayankandathil / AzureResourceManagerLogin.ps1
Last active February 12, 2017 19:08
Windows PowerShell Script to Login to an Azure Subscription
# This PowerShell script assumes that your Azure subscription is integrated with your companny's SSO
# Trigger the SSO login dialog (a separate window will come up)
Login-AzureRmAccount
# Choose the subscription (account) you want to work with - you may have multiple subscriptions
Select-AzureRmSubscription -SubscriptionName your_subscription_name_here
# The line below is optional, if you already have a resource group defined along with a storage account
Set-AzureRmCurrentStorageAccount -ResourceGroupname "your_resourcegroup_name_here" -StorageAccountName "your_storageaccount_name_here"
@jayankandathil
jayankandathil / jmx.yml
Created June 2, 2016 00:24
New Relic YAML extension to monitor AEM Apache Sling Job Queues (goes in /extensions)
name: Custom JMX
version: 1.0
enabled: true
jmx:
- object_name: "java.lang:type=Threading"
metrics:
- attributes: ThreadCount, PeakThreadCount, DeamonThreadCount, TotalStartedThreadCount
- object_name: "org.apache.sling:type=queues,name=AllQueues"
metrics:
@jayankandathil
jayankandathil / start.bat
Last active May 2, 2018 19:59
Customized Start Script for AEM 6.2 author on Windows (16 GB memory, 4 vCPUs)
@echo off
:: This script configures the start information for this server.
::
:: The following variables may be used to override the defaults.
:: For one-time overrides the variable can be set as part of the command-line; e.g.,
::
:: SET CQ_PORT=1234 & ./start.bat
::
setlocal
@jayankandathil
jayankandathil / start.bat
Last active September 10, 2018 08:37
Adobe AEM 6.1 Windows start.bat for Java 8 (assumes 15 GB vRAM and 8 vCPUs)
@echo off
:: This script configures the start information for this server.
setlocal
::* TCP port used for stop and status scripts
set CQ_PORT=4502
::* runmode(s)
::* will not be used if repository is already present
@jayankandathil
jayankandathil / mongod.conf
Created November 29, 2015 19:06
MongoDB 3.0 configuration on Windows for the WiredTiger storage engine for AEM 6.1 DEV environments
net:
http:
RESTInterfaceEnabled: true
enabled: true
port: 27017
processManagement:
pidFilePath: C:\Programs\MongoDB\Server\3.0\mongod.pid
storage:
engine: wiredTiger
dbPath: C:\Programs\MongoDB\Server\3.0\data
@jayankandathil
jayankandathil / aem_repo_check.sh
Created July 6, 2015 16:32
Script to Trigger Repository Check in AEM 6.0 and 6.1 CRX3
#!/bin/bash
# Bash script to run AEM 6.0 and 6.1 Repository Check
# Author : Jayan Kandathil
# Version : 0.1
# Last updated : July 6, 2015
# Instructions : Copy to CQ's /bin folder, make necessary changes, enable the execute bit and run
@jayankandathil
jayankandathil / cq_trigger_blobgc.sh
Last active August 29, 2015 14:21
Shell script to trigger AEM6 BlobGC via curl and JMX
#!/bin/bash
# Bash script to trigger AEM 6.0 Blob GC using curl via JMX
# Author : Jayan Kandathil
# Version : 0.1
# Last updated : May 14, 2015
# Instructions : Copy to CQ/AEM Linux instance's /tmp folder, make necessary changes, enable the execute bit and run
@jayankandathil
jayankandathil / AWS_User_Policy_for_Access_to_Specific_S3_Bucket
Created May 8, 2015 02:40
AWS user policy that needs to be attached to an IAM user account so that it can have access to only a specific S3 bucket but not the other buckets
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets"
],
"Resource": "arn:aws:s3:::*"
},