Code Monkey home page Code Monkey logo

cq-misc's Introduction

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" : ""

cq-misc's People

Contributors

davidegiannella avatar rwunsch avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.