Angular-cli e2e

Angular-cli e2e (Test FrontEnd) Protractor is an end-to-end test framework for AngularJS applications. To install: npm install -g protractor prerequisit angular CLI to update: ./node_modules/protractor/bin/webdriver-manager update Documuentation API: http://www.protractortest.org/#/api To launch test: ng e2e Initial structure e2e/ ├── app.e2e.ts Root test ├── common.po.ts Common functionality ├── login │ └── login.po.ts Specific to the page ├──…

Continue reading →

Generic delta JS for JSON-Patch (RFC6902)

all info about rfc6902 var utils = { deltaPatch: function(actual, initial) { var cleanResult, resultInline, result = []; result = deepDiffMapper.map(actual, initial); angular.forEach(result, function(value, key) { if (value.length) { resultInline = resultInline.concat(value); } else { resultInline.push(value); } }); angular.forEach(inline, function(value, key) { if (value.op !== ‘unchanged’ && Object.prototype.toString.call(value) !== ‘[object Array]’) { cleanResult.push(value); } });…

Continue reading →

change ip and temperature alarm

start with install crontab sudo apt-get install crontab maybe present for default sudo apt-get install sendemail sending email by terminal create a file nano inforaspy and paste this #!/bin/bash ############ Parameters ############ user=”xx” tempmax=”55″ mittente=”xxxxx@xxx” dest=”xxxxx@xxx” smtp=”smtp.xxxx” username=”xxxxx@xxx” pass=”xxxxxxxx” ############ End Parameters ############ ip_old=”`tail /home/$user/.inforaspy`” ip_now=”`wget -qO- http://checkip.dyndns.org/ | sed “s/.* ([[:digit:]]*.[[:digit:]]*.[[:digit:]]*.[[:digit:]]*).*/$ temp=”`cat /sys/class/thermal/thermal_zone0/temp |…

Continue reading →

Subversion command cheat sheet

Subversion command summary cheat sheet: Command Description svn –help List Subversion commands svn help commandAlso: ? or h Help on given “command“ svn add filenamesvn add directory Add a file or directory to Subversion CM control.Must also perform: svn ci filename (or svn commit) to upload the file or directory. File will not be available…

Continue reading →

Instalar y configurar Sublime Text

En el caso que tengamos ya instalado sublime y queramos reinstalar y desechar cualquier configuración anterior. OS X: ~/Library/Application Support/Sublime Text 2 Windows: %APPDATA%\Sublime Text 2 Linux: ~/.config/sublime-text-2 Debemos eliminar el directorio. Se debe hacer con el Sublime cerrado. Borramos y volvemos  arrancar el sublime. Para instalar y desinstalar paquetes en Sublime Text 2 es…

Continue reading →