Category: Uncategorized
-
Docker Cheat sheet
Quick commands : — to rebuild after changes to the Dockerfile. docker-compose build — équivalent de vagrant up docker-compose up -d — accéder au container. container_php is the container name. docker exec -it container_php bash To install : https://docs.docker.com/install/linux/docker-ce/ubuntu/
-
Symfony PHP Testing with PHPUnit (Reminders)
Start the web server php bin/console server:start -d public Run test on file ./vendor/bin/simple-phpunit tests/Controller/Api/filenametotest.php
-
Console app hangs until a key is pressed
On Windows, When you run a console application, it happens that it freezes and it unfreezes just by hitting a key. That behavior just made me lose about an hour of computing time this morning. Like it is often, the answer seem to be on StackOverflow http://stackoverflow.com/questions/39664389/console-application-freezes-until-key-pressed-mouse-clicked I’m trying this.
-
PHPExcel – PHP 7
Don’t forget to install php zip library if phpexcel outputs a 0 byte file. sudo apt-get install php7.0-zip
-
MySQL – Remove definers
Remove definers from mysql dump files. sed -r -e ‘s/DEFINER=’.+’@’.+’\s//’ < dump.sql > dump-final.sql I will update this entry when I can find the blog I found it on just so the person can get credit for it. Other options is to rename the definers. UPDATE `mysql`.`proc` p SET definer = ‘newdefiner’ WHERE definer=’olddefiner’ AND…
-
Ubuntu – Start shell script from desktop shortcut
cd /usr/share/applications sudo nano myapp.desktop [Desktop Entry] Name=MyScript Comment=Description Exec=sh -c ‘/home/USER/scripts/myscript’ && disown Icon=/home/USER/scripts/icon.png Terminal=false Type=Application StartupNotify=true Replace USER by your username For Icon, type the whole path to your image. Drag and drop your newly created shortcut to Ubuntu left menu bar.
-
Vagrant issues with mounting shares. Ubuntu 16.04
If you have the following when you do vagrant up : Failed to mount folders in Linux guest. This is usually because the “vboxsf” file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was: mount -t vboxsf -o uid=`id -u…