Skip to content

Instantly share code, notes, and snippets.

View anupammaiti's full-sized avatar
😎
Before software can be reusable it first has to be usable

Anupam Maiti anupammaiti

😎
Before software can be reusable it first has to be usable
View GitHub Profile
@anupammaiti
anupammaiti / start.bat
Created October 16, 2016 20:06 — forked from jayankandathil/start.bat
Adobe AEM 6.0 Windows start.bat for MongoDB (DEV environment)
@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
@anupammaiti
anupammaiti / h2.sh
Created December 5, 2016 08:42 — forked from ohneda/h2.sh
h2 database init script ( based on Jenkins init script )
# /etc/default/h2
# defaults for h2 database server
# pulled in from the init script; makes things easier.
NAME=h2
# location of java
JAVA=/usr/bin/java
# arguments to pass to java
@anupammaiti
anupammaiti / README.md
Created December 19, 2016 15:42 — forked from toodooleedoo/README.md
AEM/CQ AEM Java LDAP Proxy

Inside your AEM bin folder you will find a proxy.jar. You can the point AEM to this proxy and run the proxy pointing to the real LDAP server.

Helps for debugging and in this case I added this snippet to our development servers startup script.

@anupammaiti
anupammaiti / AemResourceResolutionServlet.java
Created January 19, 2017 02:01 — forked from nateyolles/AemResourceResolutionServlet.java
Get the HTML markup for a resource in AEM / CQ.
package com.nateyolles.aem;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
import org.apache.sling.engine.SlingRequestProcessor;
@anupammaiti
anupammaiti / SlingResourceResolutionServlet.java
Created January 19, 2017 02:05 — forked from nateyolles/SlingResourceResolutionServlet.java
Get the HTML markup for a resource in Apache Sling.
package com.nateyolles.sling;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
import org.apache.sling.engine.SlingRequestProcessor;
@anupammaiti
anupammaiti / tomcat-service.sh
Created February 12, 2017 20:29 — forked from lesstif/tomcat-service.sh
RHEL/CentOS tomcat7 init.d service script.
#!/bin/bash
#
# tomcat
#
# chkconfig: 345 96 30
# description: Start up the Tomcat servlet engine.
#
# processname: java
# pidfile: /var/run/tomcat.pid
#
@anupammaiti
anupammaiti / gist:bfafcf117955ce0d26277a3352b51285
Created February 12, 2017 20:30 — forked from blalor/gist:c325d500818361e28daf
redhat init script for consul
#!/bin/bash
#
# consul Manage the consul agent
#
# chkconfig: 2345 95 95
# description: Consul is a tool for service discovery and configuration
# processname: consul
# config: /etc/consul.conf
# pidfile: /var/run/consul.pid
@anupammaiti
anupammaiti / stream_to_youtube.sh
Created April 2, 2017 03:33 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
/vanity_urls {
/url "/libs/granite/dispatcher/content/vanityUrls.html"
/file "/tmp/vanity_urls"
/delay 300
}
mongouri="mongodb://<hostname-or-IP>:<port#>"
db="OakAuthor"
cache="256"
nodeCachePercentage="25"
prevDocCachePercentage="4"
childrenCachePercentage="10"
diffCachePercentage="5"
docChildrenCachePercentage="3"
cacheSegmentCount="16"
cacheStackMoveDistance="16"