ADM Blog

Delete old snapshots from Alfresco

If you're an Alfresco user, you may have noticed that it creates a snapshot of the store every time you publish something in the staging sandbox. In time this ads up to a lot of MB. If you wish to delete old snapshots of your store, here's the way to do it with version 2.2+ of Alfresco using the AVM Console

First, open up the console at http://host:port/alfresco/faces/jsp/admin/avm-console.jsp
In the command line box, write

lsver, mystore

(where mystore is the name of your store)
This command will list all the snapshots. Now, you can remove individual snapshots by their id with

rmver, mystore, version

or remove a bunch of snapshots between two dates with

rmvers, mystore, 2010-06-25T10:43:06.214Z, 2010-12-09T12:30:26.769Z

The dates you can get from the list of snapshots. The documentation says that the date must be in ISO 8601 but I got an error trying to copy-paste the date from the list with the timezone at the end (+01:00) so I replaced that with Z and worked just fine.


Alfresco CIFS shared drive authentication problem

I'm a newbie in Alfresco and honestly cannot find my way in there. If you are trying to develop a WebScript or some other type of service for Alfresco, you can either upload files one by one using the web interface or you can map the CIFS shared drive (\\workstationA\Alfresco\) and use it as a file-system. It seems it worked just fine in Windows XP and friends but I have Windows 7 and I simply could not make it work. It requests a user name and a password but then returns a "Failed to authenticate. Invalid user or password" message The hack I found seems really dumb and I'm sure there is a better solution out there but this works for me.

What you have to do is go to your hosts file (Windows\System32\drivers\etc\hosts) and add a new line in there mapping the workstaionA (Where workstationA is your computer name + the letter a) to some unused IP address. workstationA

That's it, now it works and you can map it as a network drive and do your development in peace.

net use X: \\workstationA\Alfresco /user:admin admin /persistent:yes

Note: admin/admin are the Alfresco default username and password, you should change that and use yours.

Happy codding !


Zen Coding

If you write HTML for a living, and you don't know Zen Coding yet, you are missing out big time.

Zen Coding is build as a plugin for commonly used editors (including Notepad++, yey!) that allows you to write HTML, CSS and XML code 20 time faster. So writing:


with a keystroke converts to:

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en">
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<div id="header">
		<div id="logo"></div>
		<ul id="nav">
			<li class="item-1"><a href=""></a></li>
			<li class="item-2"><a href=""></a></li>
			<li class="item-3"><a href=""></a></li>
			<li class="item-4"><a href=""></a></li>
			<li class="item-5"><a href=""></a></li>

Don't get this wrong, like the man said, "The purpose of ZC is not to write a full HTML page with a single line, but to help you write smaller code chunks.". Here is a video introducing the system in further detail.

It is easier than it looks actually, and looking a bit over the syntax will make total sense. Printing the cheat sheet also helps :)

Also worth noticing that in Notepad++ (the only one I tried) the plugin added few more functions that help with the coding that I'm sure you'll enjoy (Jumping to the edit points is a God given). This project inspired another neat tool for PHP developers to output HTML using this syntax from code. You can find more here

I have only touched briefly on what it can do but I will certainly not author another single HTML document without the benefit of Zen Coding.


10 Firefox add-ons for web designers

Firefox has emerged victorious from the Great Browser War - at least as far as web developers are concerned. While it may not be the most-used browser for the everyday web surfer, Firefox is clearly the first choice of developers for a few very simple reasons. Its support for web standards is legendary, but the real super powers come from Firefox’s extensibility. With a plethora of add-ons and extensions, created for developers by developers, Firefox becomes much more than just a browser and turns into an essential part of your toolbox. Rather than digging through your source code with squinted eyes, use Firefox add-ons to pinpoint Javascript errors and debug them like a pro. Use add-ons to measure areas of your page, select colors directly from the site or view the specific CSS assigned to a pesky

element. You can even get a leg up on assuring your sites are accessible and use valid markup - all thanks to Firefox’s add-ons.

Here are 10 free add-ons covering everything from DOM inspection to screenshots, making designing and developing with Firefox a breeze.

1. Firebug + Firecookie + Codeburner

The first on our list of 10 is actually 3 separate add-ons but they are all meant to work together, and when combined they form one of the most powerful development tools available.

11-150x150First and foremost, if you’re doing any sort of Javascript development Firebug is essential. Otherwise you’re really just stumbling around in the dark when it comes to debugging. Firebug not only gives you a robust error console, but also lets you add breakpoints in your code. Firebug’s HTML and CSS inspector gives you the freedom to either browse your source code in a collapsible tree, or click an element within the page to see its markup. Firebug also lets you edit your “live” HTML and CSS and instantly displays the results for you to review - no reloading, no saving.

12-150x150Install the Firecookie add-on and Firebug gets a new super-power: complete cookie viewing and management. You can view the full content of each cookie, and even edit and delete them all from Firebug’s window.

Codeburner then rounds out the Firebug setup by adding a compete W3C reference lookup with search-as-you-type on HTML elements & attributes as well as CSS properties. Ever wonder which browsers support the text-transform CSS atrtribute? Codeburner will tell you that it’s buggy in IE7, but has full support in Firefox 3, Safari 3 and Opera 9.
Here are 10 free add-ons covering everything from DOM inspection to screenshots, making designing and developing with Firefox a breeze.

Download: Firebug, Firecookie, Codburner

2. Web Developer Toolbar

If writing Javascript without Firebug is like fumbling in the dark, building a site without the Web Developer Toolbar is like blindfolding yourself, tieing your hands and and trying to run through the woods without hitting a tree. Disable your cache, images and cookies, switch style sheets by media type, auto-fill forms with temp data, outline certain element types, resize the browser window to common sizes and validate your markup - all from within one toolbar. The Web Developer Toolbar does a whole lot more and is always the first add-on I install in Firefox. Give it a try and you’ll wonder how you ever got along without it.

Download: Web Developer Toolbar

3. Measure It

3-150x150Ever need to know just how much space you have for a photo, or how wide a dynamically sized column is? This handy little guy lets you measure, in pixels, any area on the page. Super simple and super helpful.

Download: Measure It

4. Colorzilla

Another very simple but very useful add-on that displays the RGB and HTML color codes directly beneath your cursor. With a click, Colorzilla will copy the HTML color code to your clipboard for use in your favorite editor.


Download: Colorzilla

5. CSS Viewer

5-150x150CSS Viewer takes one of the features in the Web Developer Toolbar and makes it a little easier. Just point your cursor at any element on the page and CSS Viewer will show you all of its CSS attributes, from size and position to fonts and colors, all in an easy to read overlay.

Download: CSS Viewer

6. ScreenGrab

6-150x141A simple screenshot tool, Screengrab will save the visible area or the complete page as a file on your desktop. You can choose to save as a png or jpg, and even auto-add a datestamp to the file name

Download: ScreenGrab

7. Gridfox

gridfox-150x150If you use grid layouts or want to learn how, Gridfox is for you. It displays a simple overlay on your page to help you align elements to both vertical and horizontal grid lines. You can easily set the column and row sizes and spacing, choose from left-aligned, right-aligned or centered layouts and set the opacity of the overlay.

Download: Gridfox

8. User Agent Switcher

9-150x150If you swap style sheets or display alternate content based on which browser the user is viewing your site with, this add-on will tell Firefox to pretend it is another browser. Choose from Opera, Internet Explorer, or add your own custom user-agents to the list.

Download: User Agent Switcher

9. PageDiff

10-150x150Those of you familiar with the linux/unix “diff” command will instantly understand what this add-on does. Compare the source code of any two pages and see where they differ. This is very useful when comparing staging and production environments, or comparing a backup to a current deployment before restoring any code.

Download: PageDiff

10.  Cache View and Cache Status

1208087359CacheView is a GUI Front-end of "about:cache" that allows searching,sorting and saveing memory and disk cache files. Very usefull when 1) You want to see what is in your cache and 2) Save things from memory or disk cache since firefox has a very cryptic way of storing it's cache.

Cache Status is a customizable presence to your browser window's statusbar that gives you up-to-date information on your browser's cache usage, both RAM and the hard drive. The presence also has a right-click context menu, where you can easily clear your 943948800browser's cache. It can also automatically clean your cache when it reaches a specified level, through its Options.

Download: Cache Viewer, Cache Status


Flex and Visual Studio

Visual Studio is really popular with developers and for good reasons. It's fast, has some of the best Intellisense and debuging there is and now you can also use it for Flex authoring. Amethyst is developed by SapphireSteel and it's currently in public Beta.

One of the smartest moves Adobe ever did was to release the Flex SDK and make it easy to integrate it with other code editors. We know of quite a few editors (commercial and open source) that use the SDK, so this is certainly extending the Flex echo-system. Amethyst is a free IDE that builds on Visual Studio. If you already have Visual Studio and the Flex SDK installed, you only need to run the Amethyst installer to get started.


Amethyst offers code completion, formatting and intellisense for AS3 and MXML. There's class templates for AS3, AIR, MXML, MXML components and more. The code is color coded and collapsible and all the neat Visual Basic panels such as Object and Solution Explorer works. The Personal Edition of Amethyst will be a free download for always, but some IntelliSense features may be provided in the ‘Professional’ edition only. The latest version was released only days ago and the beta now has super-fast intellisense, so if the slow intellisense in Flex Builder is killing your productivity, this could be worth a shot.

Check out more and download from here