Skip to content

Instantly share code, notes, and snippets.

package com.swazzy.viewresolver;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
alex4u2nv / cloned-vm-update-network
Last active Dec 31, 2015
Update the network interface for a cloned linux virtual machine
View cloned-vm-update-network
ifconfig eth1 up && eth1=`ifconfig | grep eth1 | sed 's/.*HWaddr //g'` && cat /etc/sysconfig/network-scripts/ifcfg-eth0 | sed "s/HWADDR.*/HWADDR=$eth1/" | sed "s/eth0/eth1/g" > /etc/sysconfig/network-scripts/ifcfg-eth1 && rm /etc/sysconfig/network-scripts/ifcfg-eth0 && service network restart
View gist:10000929
public class MyBehaviourPolicy implements NodeServicePolicies.OnCreateChildAssociationPolicy {
private PolicyComponent policyComponent;
public PolicyComponent getPolicyComponent() {
return policyComponent;
public void setPolicyComponent(PolicyComponent policyComponent) {
this.policyComponent = policyComponent;
alex4u2nv / gist:2292a4ab84119397d619
Created Aug 12, 2014
Import Software Engineering Space Template.js
View gist:2292a4ab84119397d619
var mQuery = {
query: "select * from cmis:folder where contains " +
"('PATH:\"/app:company_home/app:dictionary/app:space_templates/*\"') " +
"and cmis:name='Software Engineering Project'",
language: "cmis-alfresco"
var results = search.query(mQuery);
//copy the template into our Document Folder
alex4u2nv / share-custom-module-context.xml
Last active Aug 29, 2015
View share-custom-module-context.xml
<!-- example custom-config.xml bootstrap -->
<bean id="custom.module.config" class="org.springframework.extensions.config.ConfigBootstrap" init-method="register">
<property name="configService" ref="web.config" />
<property name="configs">
View logo
aws ec2 describe-volumes --filters Name=status,Values=available --query 'Volumes[*].{ID:VolumeId}' |grep "ID" |cut -d: -f2 |xargs -n 1 aws ec2 delete-volume --volume-id
View gist:fd48a33741da87bccc3f8e61adbcd193
mvn archetype:generate -Dfilter=org.alfresco:
View alfresco-sdk-pom.xml
View alfresco-upgrade-pom.xml
<!-- Alfresco Maven Plugin version to use -->
<!-- Alfresco Data directory, which will contain: Content Store (i.e. the files we upload) Database (i.e. the metadata for the uploaded files) Search index (i.e. the indexed content and metadata) Configured in with the
'dir.root' property. -->
<!-- Duplicated with alfresco.solrHome in the plugin, we need them out here to do filtering -->