meditatingdeveloper

Meditation meets software development

[WSL] Cheat Sheet

How to install maven? https://kontext.tech/column/javaprogramming/630/install-maven-on-wsl How to install Java 8? https://kontext.tech/column/javaprogramming/621/install-open-jdk-on-wsl How to switch Java version? sudo update-alternatives –config java https://attacomsian.com/blog/change-default-java-version-ubuntu

[Ubuntu] Cheat Sheet

File or folder size check (first level) du -ch –max-depth=1 How to create soft link? ln -s [source] [destination] ln -s /mnt/external_drive/stock_photos ~/stock_photos https://phoenixnap.com/kb/symbolic-link-linux How to setup cron job? ‘crontab -e’ => modify => save and it applies immediately. cron syntax https://crontab.guru/every-night-at-midnight How to replace string in a file? https://askubuntu.com/questions/20414/find-and-replace-text-within-a-file-using-commands How to install AWS CLI …

[Ubuntu] Cheat Sheet Read More »

[Bitnami WordPress] Cheat Sheet

How to enable www to non-www redirection? https://docs.bitnami.com/general/apps/drupal/administration/redirect-custom-domains/#redirect-www-myapp-example-com-to-myapp-example-com How to enable debug mode? Modify /opt/bitnami/wordpress/wp-config.php define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); How to configure after creating Bitnami WordPress instance? sudo vi /opt/bitnami/php/etc/php.ini post_max_size=1024M upload_max_filesize=1024M memory_limit=2048M sudo vi /opt/bitnami/php/etc/php-fpm.d/www.conf pm=ondemand For certain cases, static mode can be more efficient. pm=static …

[Bitnami WordPress] Cheat Sheet Read More »

[mysql] Cheat Sheet

How to set up slow query log? Be sure to change owner chown mysql:mysql ~/mysql-slow.log https://voidfunction-e.tistory.com/entry/mysql-슬로우-쿼리-로그-설정-및-테스트 How to create read only user? CREATE USER ‘reader’@’%’ IDENTIFIED BY ‘your-password’; GRANT SELECT ON gomiboard.* TO ‘reader’@’%’; FLUSH PRIVILEGES; https://kodejava.org/how-to-create-a-read-only-mysql-user/

[Node.js] Cheat Sheet

Install NVM on Ubuntu 20.04 curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash source ~/.profile https://tecadmin.net/how-to-install-nvm-on-ubuntu-20-04/ NVM frequent commands nvm install –lts node -v npm -v Send email https://www.w3schools.com/nodejs/nodejs_email.asp Set up 2FA and app password for your Gmail account. Install PM2 on Ubuntu 20.04 npm install pm2 -g PM2 frequent commands pm2 start app.js Check logs pm2 logs https://pm2.keymetrics.io/docs/usage/log-management/#:~:text=Log%20files%20are%20located%20in,pm2%2Flogs%20.

How to set up Bitnami WordPress in AWS LightSail

In this tutorial, you can achieve Set up a Bitnami WordPress in AWS LightSail Set up a basic Bitnami configuration sudo vi /opt/bitnami/php/etc/php.ini post_max_size=1024M  upload_max_filesize=1024M memory_limit=2048M sudo vi /opt/bitnami/php/etc/php-fpm.d/www.conf pm=ondemand sudo /opt/bitnami/ctlscript.sh restart define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);define(‘WP_HOME’, ‘https://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);