This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.cq.services; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Properties; | |
import org.apache.felix.scr.annotations.Property; | |
import org.apache.felix.scr.annotations.Service; | |
import org.osgi.framework.Constants; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.cq.servlets; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Properties; | |
import org.apache.felix.scr.annotations.Property; | |
import org.apache.felix.scr.annotations.Service; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.servlets.SlingAllMethodsServlet; | |
import org.slf4j.Logger; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OSX 10.5 or later Apple recommends to set the $JAVA_HOME variable to /usr/libexec/java_home | |
# so just export $JAVA_HOME in file ~/.bash_profile or ~/.profile or ~/.zshrc | |
# /usr/libexec/java_home return the Java version specified in Java Preferences for the current user. | |
export JAVA_HOME=$(/usr/libexec/java_home) | |
#specific version | |
#export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if (( $# < 1 )) | |
then | |
echo "You should add more stuff ;)" | |
echo "example: $0 ~/Desktop/file.json http://localhost:4502/content/copy" | |
exit 1 | |
fi | |
j="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
var TOUCH = '/editor.html'; | |
var CLASSIC = '/cf'; | |
var createURL = function(path, qs, hash) { | |
var url = path; | |
if(qs.length != 0 && !(qs.length == 1 && qs[0] == '')) { | |
url += '?' + qs.join('&'); | |
} | |
url += hash; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = require('express')(); | |
var multer = require('multer') | |
var lwip = require('lwip') | |
app.use(multer({inMemory: true})) | |
app.post('/', function (req, res) { | |
var fileBuffer = req.files.file.buffer | |
lwip.open(fileBuffer, 'jpg', function(err, image) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chgrp -R admin /usr/local | |
chmod -R g+w /usr/local | |
chgrp -R admin /Library/Caches/Homebrew | |
chmod -R g+w /Library/Caches/Homebrew |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles | |
Build a bundle | |
curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F | |
descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://localhost:4502/bin/querybuilder.json? | |
type=cq:Page& | |
path=/content/geometrixx/en/products/triangle& | |
group.p.or=true& | |
group.1_property=jcr:content/cq:lastReplicationAction& | |
group.1_property.value=Deactivate& | |
group.2_property=jcr:content/cq:lastReplicationAction& | |
group.2_property.operation=not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############ log file configuration ############## | |
LOG_DIR="./" | |
today=$(date +"%Y-%m-%d") | |
logfile="$LOG_DIR/aem-content-refresh.log.$today" | |
############ Environment connections ############## | |
# Source Author Slave | |
SOURCE_AUTH_LOGIN="admin" |