Find out linux distribution

This post is mostly for me as I keep forgeting how to do it.

Type the following command in the terminal in order to find the Linux distribution :

     cat /etc/issue

MyFaces Trinidad invalid_lhs_in_assignment using Partial Page Rendering (PPR)

I stumbled upon a weird error last week. I was having the following error in some of my pages after a PPR request :
["Error ", 
ReferenceError
arguments: Array[0]
get message: function getter() { [native code] }
get stack: function getter() { [native code] }
set message: function setter() { [native code] }
set stack: function setter() { [native code] }
type: "invalid_lhs_in_assignment"
__proto__: Error
, " delivering XML request status changed to ", function (requestEvent)
{
  if (requestEvent.getStatus() == TrXMLRequestEvent.STATUS_COMPLETE)
  {
    var statusCode = requestEvent.getResponseStatusCode();

    // The server might not return successfully, for example if an
    // exception is thrown.  When that happens, a non-200 (OK) status
    // code is returned as part of the HTTP prototcol.
    if (statusCode == 200)
    {
      _pprStopBlocking(window);

      if (requestEvent.isPprResponse())
      {
        var responseDocument = requestEvent.getResponseXML();

        // Though not yet supported, Nokia browser sometimes fails to get
        // XML content. (Currently being investigated.) When that happens,
        // the function should simply return without calling
        // _handlePprResponse rather than crushing the function with null
        // pointer reference.
        // This is a temporary workaround and should be revisited when
        // Nokia browser is officially supported.
        if (responseDocument != null)
        {
          this._handlePprResponse(responseDocument.documentElement);
        }
      }
      else
      {
        // Should log some warning that we got an invalid response
      }
    }
    else if (statusCode >= 400)
    {
      // The RequestQueue logs these for us, so
      // we don't need to take action here.  IMO, that's probably
      // wrong - we should do the handling here
      _pprStopBlocking(window);
    }

  }
}]

In some pages this caused everything to break (nothing was being updated), while in other pages my PPR requests where working properly, despite the error message. What I found out, from this very eloquent error message, is that when a component has a "-" in their ID like so :




So I removed the "-" in the ID




And everything went back to normal!.

NFS Share Mac OSX Lion and Pocorn Hour A-300

I recently bought a Popcorn Hour A-300 from Syabas (which I love) but I was having trouble accessing my MAC OSX SAMBA shares.
I was getting the message :

Share not longer exists 



Since I couldn't find a way to overcome this issue I decided to export my share using NFS instead of SAMBA and now everything works fine.

Here is how I managed this in case it might be useful to someone :

1) Open the terminal application.

2) Create or update the exports file under /etc/exports :

sudo vi /etc/exports


3) edit the file and add the folder you would like to share with the appropriate options :

/Volumes/MyDisk/MyMedia -alldirs -network 192.168.1.0 -mask 255.255.255.0


here I'm sharing all subfolders of the MyMedia folder to the 192.168.1.0 network.

4) You can check your export using the command :

showmount -e



5) Finish
You can then browse your share from the popcorn hour via the NFS_SERVERS entry under networked media or permanently add your share via the setup menu.

OSX show used ports or listening applications with their PID

On OSX you can display applications listening on a given port using the lsof the commands described below will show listening application...