Skip to content

Instantly share code, notes, and snippets.

@kmurugulla
kmurugulla / gist:fc7b5f45eddcab29ae97af6ae0b987b6
Created July 13, 2017 16:41
clone multiple git repositories
curl -s https://api.github.com/orgs/Adobe-Marketing-Cloud/repos\?per_page\=200 | perl -ne 'print "$1\n" if (/"ssh_url": "([^"]+)/)' | xargs -n 1 git clone
curl -s https://api.github.com/orgs/Adobe-Consulting-Services/repos\?per_page\=200 | perl -ne 'print "$1\n" if (/"ssh_url": "([^"]+)/)' | xargs -n 1 git clone
@kmurugulla
kmurugulla / s3-cp-speed-test.sh
Created May 2, 2017 17:38
To test upload speeds to S3 (uses AWS CLI)
#! /bin/bash
#Author : Kiran Murugulla
#Description : Script to create an asset and upload binary from local machine into an S3 bucket
usage="Usage: s3-cp-speed-test.sh bucketname filepath \n"
BUCKET=$1
FILE=$2
if [ ! $# -eq 2 ] ; then
echo -e "$usage"
exit 2
@kmurugulla
kmurugulla / scp-speed-test.sh
Created May 2, 2017 17:34
Test SCP Speeds between two servers
#!/bin/bash
# scp-speed-test.sh
# Author: Alec Jacobson alecjacobsonATgmailDOTcom
#
# Test ssh connection speed by uploading and then downloading a 10000kB test
# file (optionally user-specified size)
#
# Usage:
# ./scp-speed-test.sh user@hostname [test file size in kBs]
#
@kmurugulla
kmurugulla / aem-uploadtest.sh
Created May 2, 2017 17:30
Script to create an asset node and upload associated binary into AEM
#! /bin/bash
#Author : Kiran Murugulla
#Description : Script to create an asset and upload binary from local machine into AEM
ROOT_PATH="content/dam/rrd/dsg"
ASSET_FULL_PATH="$ROOT_PATH/$3"
usage="Usage: uploadtest.sh \n aemserver:port (exclude http/s) \n adminuserid:adminpwd \n assetpath (relative to $ROOT_PATH) \n path/to/binary (on your local)\n"
START_TIME=$SECONDS
@kmurugulla
kmurugulla / querybuilder.jsp
Last active May 2, 2017 17:32
Query Builder API
<%@include file="/libs/foundation/global.jsp"%><%
%><%@page session="false" contentType="text/html; charset=utf-8"
pageEncoding="UTF-8"
import="org.apache.sling.api.resource.*,
java.util.*,
javax.jcr.*,
com.day.cq.search.*,
com.day.cq.search.result.*,
com.day.cq.wcm.api.*,
com.day.cq.dam.api.*"%>