 
     a = /\+/g  # Regex for replacing addition symbol with a space
     r = /([^&;=]+)=?([^&;]*)/g
-    d = (s)-> 
+    d = (s)->
       decodeURIComponent s.replace a, " "
     q = tag.substring 1
 

      range.selectNodeContents element
      selection.removeAllRanges()
      selection.addRange range
  
  getCallerChain:(args, depth)->
    {callee:{caller}} = args
    chain = [caller]
    while depth-- and caller = caller?.caller
      chain.push caller
    chain
  
  getUniqueId:->
    "#{__utils.getRandomNumber(100000)}_#{Date.now()}"

  getRandomNumber :(range)->
    range = range or 1000000 
    Math.floor Math.random()*range+1
  
  uniqueId : (prefix)->
    id = __utils.idCounter++
    if prefix? then "#{prefix}#{id}" else id

  getRandomRGB :()-> 
    "rgb(#{@getRandomNumber(255)},#{@getRandomNumber(255)},#{@getRandomNumber(255)})" 

  getRandomHex : ->
    # hex = (Math.random()*0xFFFFFF<<0).toString(16)

      'r-x': 5
      'rw-': 6
      'rwx': 7

  symbolsPermissionToOctal: (permissions) ->
    permissions = permissions.substr(1)

    user    = permissions.substr 0, 3
    group   = permissions.substr 3, 3
    other   = permissions.substr 6, 3
    octal   = '' + @_permissionMap()[user] + @_permissionMap()[group] + @_permissionMap()[other]

  getNameFromFullname :(fullname)->
    fullname.split(' ')[0]

  getParentPath :(path)->

    path = path.substr(0, path.length-1) if path.substr(-1) is "/"
    parentPath = path.split('/')
    parentPath.pop()
