CQ5 get service without annotation (snippet)

BundleContext context = FrameworkUtil.getBundle(MyService.class).getBundleContext(); ServiceReference reference = context.getServiceReference(MyService.class.getName()); MyService myService = (MyService) context.getService(reference); ...

August 8, 2013 · 1 min · Markus Ruepp

CQ5 replace Tab in ContentFinder with custom implementation

Adobe already explained how to add a custom tab to Content Finder. In order to replace an existing tab with your custom js file, e.g. movie tab, you simply have to use the same “id” value. For the movie tab, it is cfTab-Movies { "tabTip": CQ.I18n.getMessage("Movies"), <b>"id": "cfTab-Movies"</b>, "xtype": "contentfindertab", "iconCls": "cq-cft-tab-icon movies", (..) } ...

April 17, 2013 · 1 min · Markus Ruepp

Parent-aware unidirectional @OneToMany relationship in Hibernate/JPA

In a classical unidirectional one-to-many relation, the referred entity (Call) is not aware of its parent (Bill). public class Bill { (...) @OneToMany( fetch = FetchType.LAZY, cascade = CascadeType.ALL) <b>@JoinColumn</b>(name = "billId") private Set calls; (...) } Though, there may be some cases, where it is reasonable to make the information of the relation also available in the child entity (again, Call), e.g. if you want to retrieve all Calls of a specific Bill....

April 15, 2013 · 1 min · Markus Ruepp

Video lectures about machine learning

Some really good videos of an indian university, in the field of machine learning Decosopn Trees Neural Networks Back Propagation Learning ...

April 13, 2013 · 1 min · Markus Ruepp

Mutlitail Scrolback and Pause Features

The two probably most important features in multitail (via pantz.org). Pause To pause all the logs press the “p” key. Scroll back To use the log windows scroll back feature press the “b” key and select the log you want to scroll back through. Maybe you will need those commandline options -mb x. Set scrollback buffer size (in bytes, use xKB/MB/GB). -M nlines Set the buffersize on ALL following files....

April 5, 2013 · 1 min · Markus Ruepp

Apache2 File Permissions

Directories find /var/www -type d -exec chmod 0775 {} + Files find /var/www -type f -exec chmod 0664 {} + ...

March 31, 2013 · 1 min · Markus Ruepp

Terminator - multiple terminals in one window

Terminator is a handsome python implementation of a terminal emulator, that supports tiling, which is awesome. This means, several terminals are arranged in one window ...

March 29, 2013 · 1 min · Markus Ruepp

Multitail: Log output highlighting in terminal

Multitail is a command line tool primarily used to merge several log files. It is also capable of highlighting the output from one or more log files. In Ubuntu, you simply create or extend your multitail configuration in your home. vi ~/.multitailrc and define there your custom color scheme named yourcolorscheme colorscheme:yourcolorscheme cs_re:red,,bold:.*ERROR.* cs_re:green:INFO When invoking multitail command, provide the designated color scheme (-cS) you want to use. multitail -cS yourcolorscheme -f logs/server....

March 26, 2013 · 1 min · Markus Ruepp