Bash – How to run a script in the background with tmux
To launch a script in the background from the terminal, just use the command tmux Once inside, just run the script and then do cmd + b, d
Il n'y a pas de questions bêtes
To launch a script in the background from the terminal, just use the command tmux Once inside, just run the script and then do cmd + b, d
First of all you have to install the xdebug package for PHP 5.6 sudo apt-get install php-xdebug Then you have to enable it so it is accessible from PhpStorm for example Edit the file sudo nano /etc/php/5.6/mods-available/xdebug.ini and add the following lines xdebug.remote_enable xdebug.remote_connect_back xdebug.idekey – "vagrant" The PHP service needs to be restarted sudo … Read more
Docker In the docker-compose.yml file create an images/php image Import: build: images/php Ports: – 80:80 Volumes: – .. /..:/ var/www find your IP address (ifconfig / ipconfig) – in my example (10.1.0.133) Create a Dockerfile in the images/php folder FROM php:7.0.1-apache RUN yes pecl install -o -f xdebug rm -rf /tmp/pear "zend_extension/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so" – /usr/local/etc/php/conf.d/xdebug.ini echo … Read more
To use nano in Docker, you have to update apt-get and install nano. When trying to open a file you may face the error Error opening terminal: unknown. No worries, just export the TERM=xterm variable apt-get update apt-get install nano export TERM-xterm
To find out in which folder the script being executed is located, no matter where it is called from DIR””$( cd “$( dirname “$-B[0]ASH_SOURCE”)
In the Nginx configuration, just add the configuration fastcgi_param HTTP_AUTHORIZATION $http_authorization if_not_empty; so that the authentication variables are filled in. On the PHP side, to retrieve them $username = $_SERVER[‘PHP_AUTH_USER’]; $password = $_SERVER[‘PHP_AUTH_PW’];
To know which files are going to be modified, you have to start by fetching the branches fetch git then to see the files git log -p HEAD.. origin and the differences (three dots, not two) git diff HEAD… origin
To recover deleted files automatically without specifying the path git ls-files -d xargs git checkout —
To find a file by name in the terminal, just use Find. -type f-name "nameFile"
sudo npm cache clean -f sudo npm install -g n sudo n stable sudo ln -sf /usr/local/n/versions/node/5.4.1/bin/node /usr/bin/node