Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #! /bin/bash | |
| set -e | |
| trap "exit 1;" INT TERM EXIT | |
| # exec > >(tee $0.log) | |
| # exec 2>&1 | |
| [ -z "$CRX_URL" ] && CRX_URL=http://localhost:4502 | |
| [ -z "$CRX_CREDENTIALS" ] && CRX_CREDENTIALS=admin:admin |
| Note 1: The following CQ curl commands assumes a admin:admin username and password. | |
| Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command. | |
| Example: -F"":operation=delete"" | |
| Note 3: Quotes around name of package (or name of zip file, or jar) should be included. | |
| Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console) | |
| curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle" | |
| Upload a package AND install | |
| curl -u admin:admin -F file=@"name of zip file" -F name="name of package" |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| import java.io.IOException; | |
| import org.apache.commons.httpclient.Header; | |
| import org.apache.commons.httpclient.HttpClient; | |
| import org.apache.commons.httpclient.HttpException; | |
| import org.apache.commons.httpclient.methods.GetMethod; | |
| import org.apache.commons.httpclient.methods.PostMethod; | |
| public class Test { |
| var debugEnabled = false | |
| var infoEnabled = true | |
| var traceEnabled = false | |
| //Maximum number of live paths to determine when a leak object is found | |
| var maxPathsToFound = 1 | |
| //No of object instances after which a progress message | |
| //is logged |
| function setjdk() { | |
| if [ $# -ne 0 ]; then | |
| removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' | |
| if [ -n "${JAVA_HOME+x}" ]; then | |
| removeFromPath $JAVA_HOME | |
| fi | |
| export JAVA_HOME=`/usr/libexec/java_home -v $@` | |
| export PATH=$JAVA_HOME/bin:$PATH | |
| fi | |
| } |
| <%@include file="/libs/foundation/global.jsp"%><% | |
| %><%@page session="false" contentType="text/html; charset=utf-8" | |
| pageEncoding="UTF-8" | |
| import="org.apache.sling.api.resource.*, | |
| com.day.commons.datasource.poolservice.DataSourcePool, | |
| javax.sql.*, | |
| java.sql.*, | |
| java.util.*, | |
| javax.jcr.*, |
| #!/bin/bash | |
| # sudo vi /usr/local/bin/debug-aem.sh <- this file | |
| # chmod a+x /usr/local/bin/debug-aem.sh | |
| # debug-aem.sh <jar-file> <debug-port> | |
| java -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${2:-8888} -jar ${1:-cq-author-p4502.jar} |
| // -------------------------------------------------------------- | |
| // change these input values | |
| // path: what oak path to show | |
| def path = "/oak:index/nodetype/:index"; | |
| // depth: how deep the tree structure should be rendered | |
| def depth = 2; | |
| // -------------------------------------------------------------- |
| SlingContextBuilder slingContextBuilder = new SlingContextBuilder(ResourceResolverType.RESOURCERESOLVER_MOCK); | |
| SlingContext context = slingContextBuilder.resourceResolverFactoryActivatorProps(ImmutableMap.<String, Object>builder() | |
| .put("resource.resolver.mapping", new String[]{"/:/", "/content/test/</"}) | |
| .build()) | |
| .resourceResolverType(ResourceResolverType.RESOURCERESOLVER_MOCK) | |
| .build(); | |
| context.create().resource("/content/test/simple", "sling:vanityPath", "/my-vanity"); |