Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 2.27 KB

README.md

File metadata and controls

61 lines (47 loc) · 2.27 KB

A place for dumping some miscellaneous around CQ5

analyse-access.sh

This script is made to ease the analysis of the access.log files producing a readable report for later thinking.

It produces the overall requests number, GET vs POST, Request distribution over time and more.

The output will be in Markdown syntax therefore it will be easier to convert it to PDFs with tools like pandoc or showing it in a browser with plugins like markdown viewer.

It can analyse as well custom path provided on the command line.

Taking from the comment within the file that will tell you how to run it:

# Analyse CQ access.log extrapolating various informations and producing a MarkDown output on stdout
#
# usage: 
#    ./analyse-access.sh access.log.2013-*
#
# you can provide additional custom paths to analyse on the command line
#    ./analyse-access.sh access.log.2013-* /my/custom/path/1 /my/custom/path/2
#
# you can save the output by a simple piping
#    ./analyse-access.sh access.log.2013-* | tee yr2013.md

EditMode.js

Often on CQ development you have to understand in javascript what's your current WCM mode: edit, preview, design or disabled.

CQ helps you with the CQ.WCM object but it won't be (and should not) available on publish.

The object will help you on a simple wrapping around and can be used straight in your custom clientlibs when needed.

Taking from the comment within the file itself

* Simple javascript object meant to be used within a CQ development to understand on a Javascript side which my Edit Mode is.
* 
* USAGE:
*      1) Drop the file in your clientlib
*      2) Reference it in your js.txt
*
*      You can now use it as it will automatically create an "editmode" object
*              (editmode.isEditMode())    ? "I'm Authoring"   : ""
*              (editmode.isPreviewMode()) ? "I'm in Preview"  : ""
*              (editmode.isDesignMode())  ? "I'm in Design"   : ""
*              (editmode.isDisabled())    ? "I'm in Disabled" : ""