Skip to content

Instantly share code, notes, and snippets.

View anupammaiti's full-sized avatar
😎
Before software can be reusable it first has to be usable

Anupam Maiti anupammaiti

😎
Before software can be reusable it first has to be usable
View GitHub Profile

Install Microsoft Office 2010 on Ubuntu

Requirements

We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba and winbind to properly work.

So, if not installed, install them:

sudo apt-get install playonlinux samba winbind
Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
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
@anupammaiti
anupammaiti / curlPackageFilterRules.sh
Created May 6, 2019 21:34 — forked from nateyolles/curlPackageFilterRules.sh
AEM/CQ cURL: Adding include/exclude rules to package filters
# Adding include/exclude rules to CQ/AEM package filters through cURL.
# Through a simple search, you will find numerous lists of CQ/AEM cURL commands.
# However, I haven't seen an example of adding rules to package filters. The
# JSON "rules" key takes an array value. You can leave the array empty if you
# don't need to include any rules. The array is of JSON objects with a
# "modifier" key and value of "include" or "exclude", and a "pattern" key with
# your path or regular expression as the value.
# create package
1. java -jar oak-run-1.6.9.jar check C:/development/customers/lh-dcep/aem-server/author/crx-quickstart/repository/segmentstore
2. Get Found latest good revision from console, then Remove all lines after the line containing the latest good revision from journal.log(https://aemexperts.blogspot.com/2018/09/segment-not-foundrepository.html)(select line,ctrl+shift+end)
3. Delete all ./crx-quickstart/repository/segmentstore/*.bak files.
3. java -jar oak-run-1.6.9.jar checkpoints C:/development/customers/lh-dcep/aem-server/author/crx-quickstart/repository/segmentstore rm-unreferenced
4. java -Xmx6000m -jar oak-run-1.6.9.jar compact C:/development/customers/lh-dcep/aem-server/author/crx-quickstart/repository/segmentstore
https://docs.campaign.adobe.com/doc/AC/en/INS_Installing_Campaign_in_Linux__Installing_packages.html
##Set envirnment Variable
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/
export PATH=$JAVA_HOME/bin:$PATH
##then
/etc/init.d/nlserver6 start
/etc/init.d/nlserver6 stop
Json Schema
https://json-schema.org/
https://json-schema-faker.js.org/
FE: https://ajv.kiwi/
Java:https://github.com/everit-org/json-schema
@anupammaiti
anupammaiti / settings.xml
Created September 10, 2018 07:45
Adobe AEM Maven settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
#!/bin/bash
#set -x
#==========================================================================
# NAME
# aem-control - start, stop, restart or check the status of
# an AEM instance (>= 5.5.0)
#
# SYNOPSIS
# aem-control [start|stop|restart|status|activate|sweep|help|version]
import javax.jcr.*;
import java.io.FileInputStream;
import org.apache.jackrabbit.commons.JcrUtils;
/**
* ImportXml Jackrabbit example application. Imports an example XML file
* and outputs the contents of the entire workspace.
*/
public class ImportXml {
package com.adobe.cq.social.cleanup_srp.impl;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.jcr.RepositoryException;
import javax.servlet.ServletException;