Dev blog
-
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.
-
sysPass 2.1.8 – Text not being translated
After some hours being lost, I discovered why sysPass translation system was not doing anything even if locale was installed. The issue lies in setLocales (/inc/SP/Core/Language.class.php), it doesn’t set all language variable. putenv(‘LANG=’ . $lang); is not enough. The following line needs to be added. putenv(‘LANGUAGE=’ . $lang); It works with this but according to…
-
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…
-
Ubuntu 16.04 – Installing epson WF-2650
Since LSB cannot be installed easily on ubuntu 16.04, drivers found on epson website is not really usable anymore. I found my answer here –> https://askubuntu.com/questions/763157/ubuntu-16-04-installing-epson-driver-fails-on-lsb-3-2/763268#763268?newreg=2a690758362a43a6ac908da5423110dc sudo apt-get install printer-driver-escpr And then simply add the printer using DNS-SD connection.
-
Allow connections to mysql through firewall (IPTABLES) from your network.
*Not in production* List the content of your iptables and display your numbers. sudo iptables -n -L –line-numbers In my case, at the 7th line was the drop all line so it’s the place where I want to insert. eth1 is the network interface on my computer that I wanted to allow access on. Run…
Got any book recommendations?