   console.log codeConverter
 
   initializeSocket = ->
-    `var canvas`
     canvas = document.getElementById('screen')
     canvas.tabIndex = 1000
     ctx = canvas.getContext('2d')

      x: pos.x
      y: pos.y
      isDown: mouseDown
    return

  handleMouseDown = (e) ->

    request.then successHandler, failureHandler

  successHandler = (response) ->
    return response.data

  failureHandler = (response) ->
    console.error 'error getting the os list'
    return

  return {
    getList: getList
    post: post
    put: put
    delete: deletea
  }

#------------------------------------------------------------------------------#
#--------------------------- Socket.io Factory --------------------------------#
#------------------------------------------------------------------------------#

app.factory 'socket', ->
  url = location.origin + '/vm'
  socket = io.connect(url)
  return socket

#------------------------------------------------------------------------------#
#--------------------------- Homepage controller ------------------------------#
#------------------------------------------------------------------------------#

app.controller 'HomeController', ($scope, $mdSidenav, os, socket, $rootScope, $mdDialog, $mdToast) ->

  # TODO: timer directive
  timerToString = (timer) ->
    minutes = '' + Math.floor(timer / 60)
    seconds = '' + timer % 60
