GET URL:
http://cdn.api.twitter.com/1/urls/count.json?url=http://blantonmedia.com
package com.adobe.example; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Service; | |
import org.apache.felix.scr.annotations.Property; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.servlets.SlingSafeMethodsServlet; | |
public static void visitRecursively(Node node, Session currentSession) { | |
try{ | |
NodeIterator list = node.getNodes(); | |
while(list.hasNext()) { | |
Node childNode = list.nextNode(); | |
// Verify child node for cqPage type | |
if((childNode.hasProperty("jcr:primaryType")) && (childNode.getProperty("jcr:primaryType").getValue().getString()).equals("cq:Page") ){ | |
{ | |
"fonts.fontSize": "14px", | |
"fonts.fontFamily": "'Monaco'", | |
"linting.collapsed": true, | |
"useTabChar": true, | |
"tabSize": 2, | |
"themes.theme": "dark_soda_theme" | |
} |
alias reloadpr="source ~/.profile" | |
alias cp="cp -iv" | |
alias mv="mv -iv" | |
alias ls='ls -GFh' | |
alias ll='ls -FGhlAp' | |
# Directory Navigation | |
alias sites='cd ~/Sites' | |
alias ..="cd ../" | |
alias ...="cd ../../" |
<?xml version="1.0" encoding="UTF-8"?> | |
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | |
jcr:primaryType="sling:OsgiConfig" | |
rootmapping.target="/welcome"/> |
(function($,sr){ | |
// debouncing function from John Hann | |
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
var debounce = function (func, threshold, execAsap) { | |
var timeout; | |
return function debounced () { | |
var obj = this, args = arguments; | |
function delayed () { |
<templateSet group="Adobe AEM"> | |
<template name="aem-statictemplate" value="<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:description="$DESCRIPTION$" jcr:primaryType="cq:Template" jcr:title="$TITLE$" allowedPaths="[$ALLOWED_PATHS$]" ranking="{Long}$RANKING$"> <jcr:content cq:designPath="$DESIGN_PATH$" jcr:primaryType="cq:PageContent" sling:resourceType="$RESOURCE_TYPE$"> </jcr:content> </jcr:root> $END$" description="Create template for Adobe AEM" toReformat="false" toShortenFQNames="true"> | |
<variable name="DESCRIPTION" expression="" defaultValue=""Enter the description"" alwaysStopAt="true" /> | |
< |
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" | |
Install a bundle | |
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F |
<%@include file="/myapp/includes/base-global.jsp" %> | |
<!-- Load sidekick only when viewing page on its own --> | |
<% if(currentPage.getPath().equals(resourcePage.getPath())) { %> | |
<cq:include script="/libs/wcm/core/components/init/init.jsp"/> | |
<% } %> |