2020年5月28日 星期四
2020年5月23日 星期六
2020年5月22日 星期五
Create new drupal from old drupal using composer
(For updating 8.9.x in kpci7, cf. https://kpchiaoo.blogspot.com/2018/09/update-drupal.html
When using:
composer update --dry-run "drupal/*"
This should show any available minor or patch update, however, my site didn't show any minor version for drupal.
So I follow this: https://www.drupal.org/docs/8/install/add-composer-to-an-existing-site
to create a new site and to transfer my old files to the new site.
1. Create a new drupal site, drupal_new:
cd /home/chiao/public_html
composer create-project drupal/recommended-project:~8.8.0 drupal_new --stability dev --no-interaction
2. Copy files to drupal_new:
Custom themes go to /var/www/sites/new_html/web/themes/custom/
Custom modules go to /var/www/sites/new_html/web/modules/custom/
Libraries go to /var/www/sites/new_html/web/libraries/
Your uploaded files and images go to /var/www/sites/new_html/web/sites/default/files/
3. Copy sites files:
cd /home/chiao/public_html/drupal_new/web/sites/default
sudo cp -av ~/public_html/drupal/sites/default/settings.php .
sudo cp -av ~/public_html/drupal/sites/default/settings.local.php .
sudo cp -av ~/public_html/drupal/sites/default/files/config_5cKxplPBXz7CfVTT9KjhZ3fJkIg1ygQ2hTdYEM64PUZQUPSy94TTCTcHuJ16-cOW_918dZ1kpw/ files/
cd /home/chiao/public_html/drupal_new/web/sites/
sudo cp -av ~/public_html/drupal/sites/development.services.yml .
change owner, www-data:
sudo chown -R www-data.www-data files/ settings.*
4. Edit composer.json in your new project root (e.g., /var/www/sites/new_html) and copy the list of packages from your old composer.json's "require" and "require-dev" sections to the new composer.jsonfile.
5. rm ~/public_html/drupal_new/composer.lock
composer install
6. All done for creating new druapl.
7. cd ~/public_html/drupal_new/
drush state:set system.maintenance_mode 1
drush cache-clear drush
composer update drupal/core-recommended --with-dependencies
drush updatedb
drush cache-clear drush
drush state:set system.maintenance_mode 0
drush cache:rebuild
2020年5月11日 星期一
Increase mp4 volume using FFMPEG
ffmpeg -i my.mp4 -vcodec copy -af "volume=25dB" my_25dB.mp4
Or,
for i in *.mp4; do \
ffmpeg -i $i -vcodec \
copy -af "volume=25dB" \
${i%.*}_25dB.mp4 ; \
done
-
cf: https://www.tenforums.com/tutorials/101274-uninstall-printer-driver-windows-10-a.html Open cmd in administer mode Run printmanagement...
-
cf: https://forums.raspberrypi.com/viewtopic.php?t=278033 For linux: First run the command: route -n It will show the metrics of the i...
-
cf: https://askubuntu.com/questions/1276111/error-upgrading-grub-efi-amd64-signed-special-device-old-ssd-does-not-exist sudo mv /var/cache...