WiFi disconnect while sleeping on Mavericks

Was just provided of a new laptop with Mac OS X Mavericks on it. Other than I think it’s a very bad product and made me seriously think about moving back to windows, I tried at all costs to solve the main issue I had: if the laptop goes to sleep the WiFi disconnects.

I can understand that for the majority of users this can be awesome but I simply hate it. I can have long-running process that want to have it running for the whole night.

Searched around the web here and there and tried many things. Reached the point where I think it’s not possible to disable this feature, therefore I went in disabling the Sleep completely. This made the trick in my situation.

Issue the following command on terminal:

$ sudo pmset -a sleep 0

Here’s my complete pmset settings:

$ pmset -g
Active Profiles:
Battery Power        -1*
AC Power        -1
Currently in use:
 standbydelay         10800
 standby              1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 darkwakes            0
 gpuswitch            2
 disksleep            0
 sleep                0
 autopoweroffdelay    14400
 hibernatemode        3
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         2
 acwake               0
 lidwake              1

References:

What’s my CQ WCM mode?

CQ offers you 4 different type of WCM modes: edit, preview, design and disabled. The first three are actually different modes while the forth is when none of them is available and, at the end, always represent the situation on the publish site.

Differentiate on the Java side is very easy as it provides java API and it provides Javascript API for doing it as well. Nevertheless the same object that gives you the mode is not (and should not be) available on the publish which will always end in ifs here and there.

This script should help you and it should be possible to drop it as part of your clientlibs and ready to be used for he use case.

Something very simple that hopefully will help your daily life. :)

https://github.com/davidegiannella/cq-misc/blob/master/EditMode.js

How many CQ5 concurrent users?

Defining the concept of concurrent user in the web world is difficult and it’s even more difficult to do it in CQ as it doesn’t keep any session informantion. Technically speaking I define two users as concurrent when a request from user A has not finished yet that the one from B starts.

Don’t know if it’s possible to achieve such information just by looking at CQ logs but the analyse-access tool help you in the analysis of the access.log files that CQ produces giving you some numbers in a very handy markdown format that can be then converted to PDF for presenting it to the business.

References:

CQ5/OSGi reference a unique service implementation

You should never ever do it. If you find yourself in the need of this; there’s something extremely wrong in your code. Nevertheless I found myself in needing it for some old legacy code that was almost impossible to fix in a reasonable time.

The question is: how can I reference a specific implementation of a service/component in an OSGi (therefore CQ5 as well) environment?

In the component, where you need to reference the implementation you can specify something like the following

@Reference(target="(component.name=com.foo.BarImpl)")
Bar bar;

In the component implementing the service you’ll have something like

@Component(immediate=true, metatype=false, name="com.foo.BarImpl")
@Service
class BarImpl implements Bar{
...

By default the framework will assign the fully qualified class name as component name. I prefer to specify it for making the code more readable and no one prohibit you to specify any arbitrary string like mickey mouse or goofy as component name.

Reference: