Skip to content

Instantly share code, notes, and snippets.

@wfpaisa
Last active September 28, 2015 14:19
Show Gist options
  • Save wfpaisa/b8d168d9e06ecbfce131 to your computer and use it in GitHub Desktop.
Save wfpaisa/b8d168d9e06ecbfce131 to your computer and use it in GitHub Desktop.

archivo: ~/.atom/snippets.cson

'*':
   'Traduccion Cakephp con php':
      'prefix': 'phptra'
      'body': '<?php echo \$translations[\'${1:this}\']; ?>${2}'

   'Traduccion Cakephp':
      'prefix': 'tra'
      'body': '\$translations[\'${1:this}\']${2}'

   'Traduccion Cakephp controlador':
      'prefix': 'traco'
      'body': '\$this->txtLang(\'${1:this}\');${2}'

   'Comentario Controlador - sailsjs':
      'prefix': '/c'
      'body': """/**
       * @module ${1:AdminController}
       * @description ${2:Controlador del Dashboard del panel administrativo del desarrollo.}
       * @see {@link http://sailsjs.org/documentation/concepts/controllers}
       * @author Felipe Uribe @wfpaisa
       * @copyright Copyright (c) 2015 [CODIGITAL]{@link http://co-digital.co/}.
       */${3}"""

   'Comentario funcion - sailsjs':
      'prefix': '/f'
      'body': """/**
      	* @description ${1:Renderiza el Dashboard del desarrollo.}
      	* @param {{}} req - Todo lo que contiene el request mas información: http://sailsjs.org/documentation/reference/request-req
      	* @param {{}} res - Todo lo que contiene el respuesta mas información: http://sailsjs.org/documentation/reference/request-res
      	* @return {${2:res.redirect()|res.view()}} ${3:sino esta autenticado redirige a la raiz de lo contrario muestra el Dashboard}
      	*/${4}"""

   'Sails log debug':
      'prefix': 'logd'
      'body': 'sails.log.debug(${1:this});${2}'

   'Sails log error':
      'prefix': 'loge'
      'body': 'sails.log.error(${1:this});${2}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment