NPM commands

Useful commands to verify updated packages: npm outdated (list project packages version vs. current packages version) npm view @angular/core@2.1.0 peerDependencies (list dependencies of a package) npm view @angular/common@2.1.0 peerDependencies npm list –depth 0 (list installed packages) npm install (after modified versions in packages.json, we should install them)

Problema en CakePHP Test AJAX con TestAction

Aparentemente, en la versión 2.7.1 se cambió la línea 376 del la clase AuthComponent en el archivo lib/Cake/Controller/Component/AuthComponent.php Se cambió la línea 376: $controller->redirect(null, 403); Por estas líneas: $controller->response->statusCode(403); $controller->response->send(); $this->_stop(); Este cambio provoca que fallen los test que se realizan con $_SERVER[‘HTTP_X_REQUESTED_WITH’] = ‘XMLHttpRequest’;   Una alternativa para solucionar el problema es hacer un…

Leer más

Keeping a process or command running after terminal has been closed

Open ssh terminal to remote server Begin scp transfer as usual Background the scp process (Ctrl+Z, then bg) Disown the backgrounded process (disown) Terminate the session (exit) and the process will continue to run on the remote machine.

Agregar Directorio en Sentora o ZPanel

So, go to /etc/zpanel/configs/apache/ Edit httpd-vhosts.conf and check OpenBasedir directives in first <VirtualHost *:80> entry (first one should be panel’s vhost). If it’s not for some wierd reason, find it and remove line that looks like: php_admin_value open_basedir «/var/zpanel/hostdata/USER/public_html/DOMAIN:/var/zpanel/temp/ etc.» # service apache2 reload

Ionic Network Error Running Ionic with Genymotion, you might run into network issues when trying to run your application in your Genymotion device VM. The one I got was : 1 2 Application Error There was a network error ( when trying to launch my app on the device. It wasn’t a firewall issue, i was successfuly able…

Leer más

Permitir CORS en Apache / Enable CORS on Apache

Fuente:   To add the CORS authorization to the header using Apache, simply add the following line inside either the <Directory>, <Location>, <Files> or <VirtualHost> sections of your server config (usually located in a *.conf file, such as httpd.conf or apache.conf), or within a .htaccess file: Header set Access-Control-Allow-Origin «*» To ensure that your…

Leer más

A %d blogueros les gusta esto: