Μηνιαία αρχεία: Μάρτιος 2020


Ubuntu 18.04 LTS: Setting up a symfony 4 skeleton project 1

Recently we decided to give it a go with Symfony PHP framework on an Ubuntu 18.04 LTS. Below you will find the commands we executed to install the skeleton project of symfony with some comments.

Composer

To install symfony, you need composer which is a dependency manager for PHP. The version of composer that was available in apt when this post was written was “very” old. Specifically, it had version Composer 1.6.3 2018-01-31 16:28:17. For this reason we decided to go with the version that is available in the official website of composer. The steps we followed were the ones below:

# Update our system
sudo apt update -y;
sudo apt upgrade -y;
# Install dependencies
sudo apt install curl php-cli php-mbstring git unzip php-xml -y;
# Get composer installer from the official site
curl -sS https://getcomposer.org/installer -o composer-setup.php;
# Verify the the download was not corrupt by checking the sha384 sum of the installer file
HASH=`curl https://composer.github.io/installer.sha384sum | cut -d' ' -f 1`;
# If this step fails, go back to the curl command and try again, it would mean that there was a problem when downloading the installer from the net
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
# Upon successfully validating the install, we can proceed to the actual installation.
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer;
source ~/.bashrc;

Symfony Skeleton Project

After the above steps are completed, we were able to proceed with the final step, which would be to create the symfony skeleton project via the composer with the following command in the folder named sandbox:

composer create-project symfony/skeleton sandbox '4.4.*';

To verify the installation of the skeleton project we started a web server with PHP in the installation folder of the project and thus verify it through the browser:

cd sandbox;
# We did not use the port 80 as it would require root access to start
php -S 127.0.0.1:8000 -t public;

From a browser visiting http://127.0.0.1:8000/ we got to see:


Ubuntu 18.04: Cannot mount Micro SD DC I Class 10

Recently we tried to mount a Micro SD card that was formatted using the exFat format. To do so we used the build in card reader of a laptop that was running Ubuntu 18.04. To our disappointment, the OS was able to “see” the device as ‘/dev/mmcblk0’ but it could not automatically mount it.

First step we did was of course to update the system using:

sudo apt update;

and then we made sure we had all the necessary packages installed:

sudo apt-get install exfat-fuse exfat-utils;

Unfortunately, we still could not automatically mount the device. So we decided to try and mount it manually which also failed:

sudo mount -t exfat /dev/mmcblk0 /mnt/vmfs;
FUSE exfat 1.2.8
ERROR: failed to read boot sector.

As we were not sure what was wrong we decided to do an experiment which turned out to be our solution: to use an external card reader and try again.. guess what? It worked!!

We will investigate further the issue with the build in card reader but for now we are able to work around the issue with the external card reader.


Coronavirus disease (COVID-19) Myth busters!

We also hate false facts, so in an attempt to help spread the correct word on COVID-19 we are reposting the myth busters for the common false COVID-19 myths.

Source: https://www.who.int/emergencies/diseases/novel-coronavirus-2019/advice-for-public/myth-busters

From the evidence so far, the COVID-19 virus can be transmitted in ALL AREAS, including areas with hot and humid weather. Regardless of climate, adopt protective measures if you live in, or travel to an area reporting COVID-19. The best way to protect yourself against COVID-19 is by frequently cleaning your hands. By doing this you eliminate viruses that may be on your hands and avoid infection that could occur by then touching your eyes, mouth, and nose.
There is no reason to believe that cold weather can kill the new coronavirus or other diseases. The normal human body temperature remains around 36.5°C to 37°C, regardless of the external temperature or weather. The most effective way to protect yourself against the new coronavirus is by frequently cleaning your hands with alcohol-based hand rub or washing them with soap and water.
There is no reason to believe that cold weather can kill the new coronavirus or other diseases. The normal human body temperature remains around 36.5°C to 37°C, regardless of the external temperature or weather. The most effective way to protect yourself against the new coronavirus is by frequently cleaning your hands with alcohol-based hand rub or washing them with soap and water.
Taking a hot bath will not prevent you from catching COVID-19. Your normal body temperature remains around 36.5°C to 37°C, regardless of the temperature of your bath or shower. Actually, taking a hot bath with extremely hot water can be harmful, as it can burn you. The best way to protect yourself against COVID-19 is by frequently cleaning your hands. By doing this you eliminate viruses that may be on your hands and avoid infection that coud occur by then touching your eyes, mouth, and nose.
Taking a hot bath will not prevent you from catching COVID-19. Your normal body temperature remains around 36.5°C to 37°C, regardless of the temperature of your bath or shower. Actually, taking a hot bath with extremely hot water can be harmful, as it can burn you. The best way to protect yourself against COVID-19 is by frequently cleaning your hands. By doing this you eliminate viruses that may be on your hands and avoid infection that coud occur by then touching your eyes, mouth, and nose.
To date there has been no information nor evidence to suggest that the new coronavirus could be transmitted by mosquitoes. The new coronavirus is a respiratory virus which spreads primarily through droplets generated when an infected person coughs or sneezes, or through droplets of saliva or discharge from the nose. To protect yourself, clean your hands frequently with an alcohol-based hand rub or wash them with soap and water. Also, avoid close contact with anyone who is coughing and sneezing.
To date there has been no information nor evidence to suggest that the new coronavirus could be transmitted by mosquitoes. The new coronavirus is a respiratory virus which spreads primarily through droplets generated when an infected person coughs or sneezes, or through droplets of saliva or discharge from the nose. To protect yourself, clean your hands frequently with an alcohol-based hand rub or wash them with soap and water. Also, avoid close contact with anyone who is coughing and sneezing.
No. Hand dryers are not effective in killing the 2019-nCoV. To protect yourself against the new coronavirus, you should frequently clean your hands with an alcohol-based hand rub or wash them with soap and water. Once your hands are cleaned, you should dry them thoroughly by using paper towels or a warm air dryer.
No. Hand dryers are not effective in killing the 2019-nCoV. To protect yourself against the new coronavirus, you should frequently clean your hands with an alcohol-based hand rub or wash them with soap and water. Once your hands are cleaned, you should dry them thoroughly by using paper towels or a warm air dryer.
UV lamps should not be used to sterilize hands or other areas of skin as UV radiation can cause skin irritation.
UV lamps should not be used to sterilize hands or other areas of skin as UV radiation can cause skin irritation.
Thermal scanners are effective in detecting people who have developed a fever (i.e. have a higher than normal body temperature) because of infection with the new coronavirus. However, they cannot detect people who are infected but are not yet sick with fever. This is because it takes between 2 and 10 days before people who are infected become sick and develop a fever.
Thermal scanners are effective in detecting people who have developed a fever (i.e. have a higher than normal body temperature) because of infection with the new coronavirus. However, they cannot detect people who are infected but are not yet sick with fever. This is because it takes between 2 and 10 days before people who are infected become sick and develop a fever.
No. Spraying alcohol or chlorine all over your body will not kill viruses that have already entered your body. Spraying such substances can be harmful to clothes or mucous membranes (i.e. eyes, mouth). Be aware that both alcohol and chlorine can be useful to disinfect surfaces, but they need to be used under appropriate recommendations.
No. Spraying alcohol or chlorine all over your body will not kill viruses that have already entered your body. Spraying such substances can be harmful to clothes or mucous membranes (i.e. eyes, mouth). Be aware that both alcohol and chlorine can be useful to disinfect surfaces, but they need to be used under appropriate recommendations.
No. Vaccines against pneumonia, such as pneumococcal vaccine and Haemophilus influenza type B (Hib) vaccine, do not provide protection against the new coronavirus. The virus is so new and different that it needs its own vaccine. Researchers are trying to develop a vaccine against 2019-nCoV, and WHO is supporting their efforts. Although these vaccines are not effective against 2019-nCoV, vaccination against respiratory illnesses is highly recommended to protect your health.
No. Vaccines against pneumonia, such as pneumococcal vaccine and Haemophilus influenza type B (Hib) vaccine, do not provide protection against the new coronavirus. The virus is so new and different that it needs its own vaccine. Researchers are trying to develop a vaccine against 2019-nCoV, and WHO is supporting their efforts. Although these vaccines are not effective against 2019-nCoV, vaccination against respiratory illnesses is highly recommended to protect your health.
No. There is no evidence that regularly rinsing the nose with saline has protected people from infection with the new coronavirus. There is some limited evidence that regularly rinsing nose with saline can help people recover more quickly from the common cold. However, regularly rinsing the nose has not been shown to prevent respiratory infections.
No. There is no evidence that regularly rinsing the nose with saline has protected people from infection with the new coronavirus. There is some limited evidence that regularly rinsing nose with saline can help people recover more quickly from the common cold. However, regularly rinsing the nose has not been shown to prevent respiratory infections.
Garlic is a healthy food that may have some antimicrobial properties. However, there is no evidence from the current outbreak that eating garlic has protected people from the new coronavirus.
Garlic is a healthy food that may have some antimicrobial properties. However, there is no evidence from the current outbreak that eating garlic has protected people from the new coronavirus.
People of all ages can be infected by the new coronavirus (2019-nCoV). Older people, and people with pre-existing medical conditions (such as asthma, diabetes, heart disease) appear to be more vulnerable to becoming severely ill with the virus. WHO advises people of all ages to take steps to protect themselves from the virus, for example by following good hand hygiene and good respiratory hygiene.
People of all ages can be infected by the new coronavirus (2019-nCoV). Older people, and people with pre-existing medical conditions (such as asthma, diabetes, heart disease) appear to be more vulnerable to becoming severely ill with the virus. WHO advises people of all ages to take steps to protect themselves from the virus, for example by following good hand hygiene and good respiratory hygiene.
No, antibiotics do not work against viruses, only bacteria. The new coronavirus (2019-nCoV) is a virus and, therefore, antibiotics should not be used as a means of prevention or treatment. However, if you are hospitalized for the 2019-nCoV, you may receive antibiotics because bacterial co-infection is possible.
No, antibiotics do not work against viruses, only bacteria. The new coronavirus (2019-nCoV) is a virus and, therefore, antibiotics should not be used as a means of prevention or treatment. However, if you are hospitalized for the 2019-nCoV, you may receive antibiotics because bacterial co-infection is possible.
To date, there is no specific medicine recommended to prevent or treat the new coronavirus (2019-nCoV). However, those infected with the virus should receive appropriate care to relieve and treat symptoms, and those with severe illness should receive optimized supportive care. Some specific treatments are under investigation, and will be tested through clinical trials. WHO is helping to accelerate research and development efforts with a range or partners.
To date, there is no specific medicine recommended to prevent or treat the new coronavirus (2019-nCoV). However, those infected with the virus should receive appropriate care to relieve and treat symptoms, and those with severe illness should receive optimized supportive care. Some specific treatments are under investigation, and will be tested through clinical trials. WHO is helping to accelerate research and development efforts with a range or partners.

Source: https://www.who.int/emergencies/diseases/novel-coronavirus-2019/advice-for-public/myth-busters