Dedunu

  • Technology
  • Travel
  • Alfresco 5.0.1 Document Preview doesn't work on Ubuntu?

    I recently installed Alfresco for testing in the vagrant instance. I used the Ubuntu image for the vagrant instance. But I forgot to install all the libraries which are necessary to be installed on Ubuntu before you install alfresco. But fortunately alfresco worked without those dependencies.

    nn

    http://docs.alfresco.com/5.0/concepts/install-lolibfiles.html

    nn

    Above link gives you what are the libraries you should install before you install Alfresco. You should run below command to install libraries.

    nn

    $ sudo apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2n

    n

    But still, office document previews didn’t work properly. Some documents worked properly but some of them didn’t. Then I tried to debug it with one of my colleagues. We found below text in our logs.

    nn

    2015-05-14 10:04:16,607  ERROR [repo.content.JodConverterSharedInstance] [localhost-startStop-1] Unable to start JodConverter library. The following error is shown for informational purposes only.n org.artofsolving.jodconverter.office.OfficeException: failed to start and connectn	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:68)n	at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:101)n	at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:66)n	at org.alfresco.enterprise.repo.content.JodConverterSharedInstance.afterPropertiesSet(JodConverterSharedInstance.java:239)n	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1572)n	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1510)n	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)n	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)n	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)n	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)n	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)n	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)n	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:633)n	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)n	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)n	at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ApplicationContextState.start(ChildApplicationContextFactory.java:809)n	at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.start(AbstractPropertyBackedBean.java:1018)n	at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.onApplicationEvent(AbstractPropertyBackedBean.java:557)n	at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)n	at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)n	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)n	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)n	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)n	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)n	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)n	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)n	at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)n	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)n	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)n	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)n	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)n	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)n	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)n	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)n	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)n	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)n	at java.util.concurrent.FutureTask.run(FutureTask.java:266)n	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)n	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)n	at java.lang.Thread.run(Thread.java:745)nCaused by: java.util.concurrent.ExecutionException: org.artofsolving.jodconverter.office.OfficeException: could not establish connectionn	at java.util.concurrent.FutureTask.report(FutureTask.java:122)n	at java.util.concurrent.FutureTask.get(FutureTask.java:206)n	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:66)n	... 39 morenCaused by: org.artofsolving.jodconverter.office.OfficeException: could not establish connectionn	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:147)n	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$0(ManagedOfficeProcess.java:122)n	at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:62)n	... 5 morenCaused by: java.lang.IllegalStateException: process with acceptString 'socket,host=127.0.0.1,port=8100' started but its pid could not be foundn	at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:137)n	at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:67)n	at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:124)n	... 7 moren

    nn

    Then we tried to run the soffice application from the terminal. Look what we got!

    nn

    /home/vagrant/alfresco-5.0.1/libreoffice/program/oosplash: error while loading shared libraries: libXinerama.so.1: cannot open shared object file: No such file or directoryn

    nn

    Then we realised that we should install that library on Ubuntu. Run below command on the Ubuntu server to install the missing library.

    nn

    $ sudo apt-get install libxinerama1n

    nn

    Make sure you run both commands above!

    nn

    Gist

    nn

      n

    • https://gist.github.com/dedunumax/3d748846bc7f6fc6b87e
    • n

    nn

    Tags

    nn

      n

    • libreoffice
    • n

    • openoffice
    • n

    • Ubuntu
    • n

    • alfresco
    • n

    n

  • Yosemite Full Screen problem :(

    People hate Yosemite. But I don’t know why. I like Yosemite more than Mavericks. But Yosemite has a problem with Maximize button. (Zoom) As you click Zoom or maximize button it will go to full-screen mode.

    nn

    To avoid this press zoom while you are pressing Option (key).

    nn

    If you want to maximize Chrome click zoom while you are pressing Option + Shift

    nn

    Tags

    nn

      n

    • osx
    • n

    • Mac
    • n

    • maximize
    • n

    • full screen
    • n

    • yosemite
    • n

    n

  • Titan DB vs Neo4J

    This comparison is an outdated comparison. I think Neo4J has improved a lot with the time. But I’m posting this because a person who wants to compare both of these technologies, can get an idea about the aspects they need to focus. If you know something is outdated please feel free to suggest using comments. I’ll update the blog post accordingly.

    nn

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    n

    Feature Neo4J Titan
    License GPL/AGPL/Commercial Apache 2 License
    Commercial Support Available Advanced: Email 5×10 USD 6000/yr Enterprise: Phone 7×24 USD 24,000/yr Available (Prices and availability of support not published officially.)
    Graph Type Property Graph Property Graph
    Storage Backend Native Storage Engine Cassandra, Hbase, Berkeley DB
        Depending on the requirement we should select Database Backend (eg: Cassandra for Availability and Partitionable, Hbase for Consistency and Partitionable)
    ACID Support Yes ACID is supported on BerkeleyDB Storage Backend
      Has Transactions in Java API. On Cassandra Eventually consistent
    Scalability Can’t Scale-out like Titan Owns very good scalability
        can scale like Cassandra if storage backend is cassandra
    High Availability Replication is the only way to have high scalability Titan is like API because of that Availability of Storage backend is the availability for graph database
      Failover is not smooth If we are using Cassandra with Titan No-Single-Point of failure. Extremely Available
    Query Language Cypher and Gremlin Gremlin
      Cypher easy to learn but only suitable for simple queries. Gremlin has good algorithms to retrieve data in an optimal way. (+ More generic)
    Graph Sharding Not Available, under development Not Available, under development
    Support for languages Java/.NET/Python/PHP/NodeJS/Scala/GO Java
    Written in Java Java
    Protocol HTTP/REST Can expose REST using Rexster
    Use cases more than 10 available 0 use cases exposed officially
    Number of edges vertices supported 2^35 (~34 Billion) Nodes (Vertices) 2^59 Vertices
      2^35 (~34 Billion) Relationships (edges) 2^60 (quintillion) edges
      2^36 (~68 Billion) Properties  
      2^15 (~32 000) Relationship types  
    Limitations   Key Index must be created prior to the key being used
        Unable to drop key indices
        For bulk graph operations we have to use Faunus otherwise storage backends get OutOfMemoryException
        Types cannot be changed once created
    Web Admin Available Not Available
    Embeddable Yes Yes
    MapReduce – Yes with Faunus
    Lucene Indexing Support Yes Yes
    Backups Yes Yes (+Titan Parallel backup)

    nn

    This link is also very useful – http://db-engines.com/en/system/Neo4j%3BTitan

    nn

    Tags

    nn

      n

    • Titan DB
    • n

    • neo4j
    • n

    • Graph DB
    • n

    • Graph database
    • n

    • NoSQL
    • n

    • Titan
    • n

    n

  • 'Alfresco: How to write a simple Java based Alfresco web script?'

    If you want to develop a new feature for Alfresco best way is WebScript! Let’s start with a simple Alfresco web script. First, you need to create an Alfresco AMP maven project using archetype. In this example, I’ll use the latest alfresco version 5.0.

    nn

    First I generated Alfresco All-in-One AMP. (Please refer my blog post on generating AMP projects.)

    nn

    If you go through the files structure which is generated, you will find out a sample web script. It is a JavaScript-based WebScript. By this example, I’m going to explain how to write a simple Java-based Hello World web script.

    nn

    HelloWorldWebScript.java

    n

    package org.dedunu.alfresco;nnimport java.util.HashMap;nimport java.util.Map;nnimport org.springframework.extensions.webscripts.Cache;nimport org.springframework.extensions.webscripts.DeclarativeWebScript;nimport org.springframework.extensions.webscripts.Status;nimport org.springframework.extensions.webscripts.WebScriptRequest;nnpublic class HelloWorldWebScript extends DeclarativeWebScript {nn    @Overriden    protected Map<String, Object> executeImpl(WebScriptRequest req,n             Status status, Cache cache) {n        Map<String, Object> model = new HashMap<String, Object>();nn        model.put("helloMessage", "Hello World! - Welcome to Alfresco Development!");nn        return model;n    }n}n

    nn

    service-context.xml

    n

    <?xml version='1.0' encoding='UTF-8'?>n<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>n<!--n	Licensed to the Apache Software Foundation (ASF) under one or moren	contributor license agreements.  See the NOTICE file distributed withn	this work for additional information regarding copyright ownership.n	The ASF licenses this file to You under the Apache License, Version 2.0n	(the "License"); you may not use this file except in compliance withn	the License.  You may obtain a copy of the License atn	http://www.apache.org/licenses/LICENSE-2.0n	Unless required by applicable law or agreed to in writing, softwaren	distributed under the License is distributed on an "AS IS" BASIS,n	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.n	See the License for the specific language governing permissions andn	limitations under the License.n-->n<beans>nn	<bean id="webscript.org.dedunu.alfresco.helloworld.get" class="org.dedunu.alfresco.HelloWorldWebScript" parent="webscript">n	</bean>nn</beans>n

    nn

    helloworld.get.desc.xml

    n

    <webscript>n    <shortname>Java based Sample Webscript</shortname>n    <description>This simple WebScript prints Hello World</description>n    <url>/dedunu/helloworld</url>n    <authentication>user</authentication>n    <format default="html"></format>n</webscript>n

    nn

    helloworld.get.html.ftl

    n

    ${helloMessage}n

    nn

    Create the above files in below locations of your maven project.

    nn

      n

    • HelloWorldWebScript.java – repo-amp/src/main/java/org/dedunu/alfresco/HelloWorldWebScript.java
    • n

    • helloworld.get.desc.xml – repo-amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/dedunu/alfresco/helloworld.get.desc.xml
    • n

    • helloworld.get.html.ftl – repo-amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/dedunu/alfresco/helloworld.get.html.ftl
    • n

    • service-context.xml – repo-amp/src/main/amp/config/alfresco/module/repo-amp/context/service-context.xml
    • n

    nn

    Use below command to run the maven project.

    nn

    $ mvn clean install -Prun n

    nn

    It may take a while to run the project after that open a browser window. Then visit below URL

    nn

    http://localhost:8080/alfresco/service/dedunu/helloworld.

    nn

    nn

    The source code of this project is available on GitHub.

    nn

    Gists

    nn

      n

    • https://gist.github.com/dedunumax/411620c73e80e81755d0
    • n

    • https://gist.github.com/dedunumax/ef370e4d00cfd4d6b05f
    • n

    • https://gist.github.com/dedunumax/534139d220554e6a3e0f
    • n

    • https://gist.github.com/dedunumax/480335164d5aa5f698fd
    • n

    nn

    Tags

    nn

      n

    • webscript
    • n

    • Java
    • n

    • alfresco
    • n

    n

  • 'Alfresco: .gitignore for Alfresco Maven Projects'

    If you are an Alfresco developer, you have to develop projects using Alfresco AMP modules. Previously Alfresco has used Ant to build projects. But latest Alfresco SDK is using Apache Maven. AMP maven projects generate a whole lot of temporary files. Those files you don’t want in your version control system. 

    nn

    Nowadays almost everyone is using Git. If I say Git is the most popular version control system today, I hope a lot of people would agree on that. In Git you can use the .gitignore file to mention what are the files that should not add to the repository. So if you mention the patterns on .gitignore, Git won’t commit unwanted files. For that, you need a good .gitignore file. Last year I wrote a blog post which has almost all the file patterns which you should emit from Java project.

    nn

    You can create a file called .gitignore on the root folder of your Git repository. Then copy the above content and add it to that file. After that commit that files into your Git repository. Now you don’t have to worry about unwanted files.

    nn

    Gists

    nn

      n

    • https://gist.github.com/dedunumax/f0187881ea0f140d8889
    • n

    nn

    Tags

    nn

      n

    • Java
    • n

    • “.gitignore”
    • n

    • git
    • n

    • maven
    • n

    • alfresco
    • n

    n

  • 'Alfresco: Calculate folder size using Java based WebScript'

    I was assigned to a training task to write a web script for calculating the size of a folder or a file. But you need to go through all the nodes recursively. If you don’t calculate it recursively in folders you won’t get accurate folder size.

    nn

    Requirements:

    nn

      n

    • Java Development Kit 1.7 or later
    • n

    • Text Editor or IDE (Eclipse/Sublime Text/Atom)
    • n

    • Apache Maven 3 or later
    • n

    • Web Browser (Chrome/Firefox/Safari)
    • n

    nn

    For this project, I generated the Alfresco 5 All-in-One maven project. You really don’t want Alfresco  Share module in this project. But I included it because you may need to find a NodeRefId. It would be easier with Share.  The source code of this project is available at GitHub.

    nn

    size.get.html.ftl

    n

    <!DOCTYPE html>n<html lang="en">n<head>n	<meta charset="utf-8">n    	<meta http-equiv="X-UA-Compatible" content="IE=edge">n    	<meta name="viewport" content="width=device-width, initial-scale=1">n	<title>Check file size</title>n</head>n<body>n    	<div>n 		<h1>Check file size</h1>n  		<p>File Name : ${fileName}</p>n		<p>File Size : ${size}</p>n	</div>n</body>n</html>n

    nn

    size.get.desc.xml

    n

    <webscript>n   <shortname>File Size</shortname>n   <description>Returns the file size of the given nodeRef</description>n   <url>/size?nodeRef={RefForNode}</url>n   <authentication>user</authentication>n   <format default="html">extension</format>n   <family>File Size Utilities</family>n</webscript>n

    nn

    FileSizeWebScript.java

    n

    package org.dedunu.alfresco;nnimport java.util.HashMap;nimport java.util.List;nimport java.util.Map;nnimport org.alfresco.model.ContentModel;nimport org.alfresco.service.cmr.repository.ChildAssociationRef;nimport org.alfresco.service.cmr.repository.ContentData;nimport org.alfresco.service.cmr.repository.NodeRef;nimport org.alfresco.service.cmr.repository.NodeService;nimport org.springframework.extensions.webscripts.Cache;nimport org.springframework.extensions.webscripts.DeclarativeWebScript;nimport org.springframework.extensions.webscripts.Status;nimport org.springframework.extensions.webscripts.WebScriptRequest;nnpublic class FileSizeWebScript extends DeclarativeWebScript {nn    /**n     * Defining node service.n     */n    private NodeService nodeService;nn    /**n     * @param nodeServicen     */n    public final void setNodeService(final NodeService nodeService) {n        this.nodeService = nodeService;n    }nn    @Overriden    protected Map<String, Object> executeImpl(WebScriptRequest req,n             Status status, Cache cache) {n        Map<String, Object> model = new HashMap<String, Object>();n        String nodeRefId = req.getParameter("nodeRef");n        NodeRef nodeRef = new NodeRef(nodeRefId);nn        String fileName = (String) nodeService.getProperty(nodeRef,n                ContentModel.PROP_NAME);nn        long size = getNodeSize(nodeRef);nn        model.put("fileName", fileName);n        model.put("size", Long.toString(size));nn        return model;n    }nn    private long getNodeSize(NodeRef nodeRef) {n        long size = 0;nn        // Collecting current node sizen        ContentData contentData = (ContentData) nodeService.getProperty(n                nodeRef, ContentModel.PROP_CONTENT);n        try {n            size = contentData.getSize();n        } catch (Exception e) {n            size = 0;n        }nn        // Collecting child nodes' sizesn        List<ChildAssociationRef> chilAssocsList = nodeServicen                .getChildAssocs(nodeRef);nn        for (ChildAssociationRef childAssociationRef : chilAssocsList) {n            NodeRef childNodeRef = childAssociationRef.getChildRef();n            size = size + getNodeSize(childNodeRef);n        }nn        return size;n    }nn}n

    nn

    service-context.xml 

    n

    <?xml version='1.0' encoding='UTF-8'?>n<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>n<!--n	Licensed to the Apache Software Foundation (ASF) under one or moren	contributor license agreements.  See the NOTICE file distributed withn	this work for additional information regarding copyright ownership.n	The ASF licenses this file to You under the Apache License, Version 2.0n	(the "License"); you may not use this file except in compliance withn	the License.  You may obtain a copy of the License atn	n	http://www.apache.org/licenses/LICENSE-2.0n	n	Unless required by applicable law or agreed to in writing, softwaren	distributed under the License is distributed on an "AS IS" BASIS,n	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.n	See the License for the specific language governing permissions andn	limitations under the License.n	n-->n<beans>n    n	<bean id="webscript.org.dedunu.alfresco.size.get" class="org.dedunu.alfresco.FileSizeWebScript" parent="webscript">n		<property name="nodeService">n			<ref bean="NodeService" />n		</property>n	</bean>n    n</beans>n

    nn

    Create above files in below locations of your maven project. 

    nn

      n

    • size.get.desc.xml – repo-amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/dedunu/alfresco/size.get.desc.xml
    • n

    • size.get.html.ftl – repo-amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/dedunu/alfresco/size.get.html.ftl
    • n

    • FileSizeWebScript.java – repo-amp/src/main/java/org/dedunu/alfresco/FileSizeWebScript.java
    • n

    • service-context.xml – repo-amp/src/main/amp/config/alfresco/module/repo-amp/context/service-context.xml
    • n

    nn

    How to test the web script?

    nn

    Take a terminal. Navigate to project folder. And type below command.

    nn

    $ mvn clean install -Prun -Dmaven.test.skipn

    nn

    It may take a while to start the Alfresco Repository and Share server. Wait till it finishes completely. 

    nn

    Then open a web browser and go to http://localhost:8080/share. Then login. Go to Document library.

    nn

    nn

    Find a folder and click on “View Details”. Then copy NodeRef from browser as shown below.

    nn

    nn

    Open a new tab and type below URL. (Replace with the NodeRef you copied from Alfresco Share interface.)

    nn

    [http://localhost:8080/alfresco/s/size?nodeRef=](http://localhost:8080/alfresco/s/size?nodeRef=%3CNodeRef%3E)

    nn

    If you have followed the instruction properly, you will get a page like below.

    nn

    nn

    If you have any questions regarding these examples, please comment!!! Enjoy Alfresco!

    nn

    Gists

    nn

      n

    • https://gist.github.com/dedunumax/20a17d08c6efe1f2314f
    • n

    • https://gist.github.com/dedunumax/e131cbf9aaef1ffc4e60
    • n

    • https://gist.github.com/dedunumax/be88aaf300dac7a19ed9
    • n

    • https://gist.github.com/dedunumax/3bb550ce1c3250613519
    • n

    nn

    Tags

    nn

      n

    • webscript
    • n

    • Java
    • n

    • recursive
    • n

    • folder
    • n

    • alfresco
    • n

    n

  • Do you want Unlimited history in Mac OS X Terminal?

    Back in 2013, I wrote a post about expanding terminal history unlimited. Recently I moved from Linux to Mac OS. Then I wanted unlimited history. Usually, in Mac OS X you will only get 500 entries in history. New entries would replace old entries.

    nn

    Take the terminal window and type below command.

    nn

    $ open ~/.bash\_profilen

    nn

    or 

    nn

    $ vim ~/.bash\_profilen

    nn

    Most probably you will get an empty file. Add below lines to that file. If the file is not empty add them in the end.

    nn

    export HISTFILESIZE=nexport HISTSIZE=n

    nn

    Next, you have to save the file. Close the terminal and get new terminal windows. Now onwards your whole history would be stored in the ~/.bash_history file.

    nn

    Tags

    nn

      n

    • terminal
    • n

    • terminal history
    • n

    • Mac
    • n

    n

  • OpenJDK is not bundled with Ubuntu by default

    This is not a technical blog post. This was about a bet. One of my ex-colleagues told that OpenJDK is installed on Ubuntu by default. And I installed a fresh Virtual machine and showed him that it won’t. Then I earned Pancakes. We went to Mel’s Tea Cafe. 

    nn

    image1

    nn

    Tags

    nn

      n

    • OpenJDK
    • n

    n

  • The Sizzle on 17th Dec

    So last month, I went to The Sizzle with one of my best friends. Food was good. 

    nn

    Good Times

    nn

    And this Sizzle visit will be remarkable. ;) So I wanted to leave a note here.

    nn

    Tags

    nn

      n

    • Sizzle
    • n

    n

  • How to run Alfresco Share or Repository AMP projects

    From the previous post, I explained how to generate an Alfresco AMP project using Maven. When you have an AMP project you can run it by deploying it to an existing Alfresco Repository or Share. But if you are a developer you will not find it as an effective way to run Alfresco modules. The other way is that you can run the AMP project using Maven plug-in. 

    nn

    In this post, I’m not going to talk about the first method. As I said earlier we can run an Alfresco instance using Maven. To do that from your terminal move to Alfresco AMP project folder and run below command.

    nn

    $ mvn clean package -Pamp-to-warn

    nn

    Perhaps it may take a while. If you are running this command for the first time it will download Alfresco binary for local Maven repository. If you are running an instance again, your changes would be still available on that Alfresco instance.

    nn

    If you want to discard all the previous data, use below command.

    nn

    $ mvn clean package -Ppurge -Pamp-to-warn

    nn

    Above command will discard all the changes and data. It will start a fresh instance.

    nn

    Enjoy Alfresco Development!!!

    nn

    Tags

    nn

      n

    • maven
    • n

    • alfresco
    • n

    n

←Previous Page
1 … 7 8 9 10 11 … 17
Next Page→
 

Loading Comments...