HTML Coding World

The Awesome Web Development Tutorials

Treat a subdirectory as root with .htaccess file in Apache

Reference: https://stackoverflow.com/questions/2402140/use-a-subdirectory-as-root-with-htaccess-in-apache-1-3

Asian fonts support on EC2/CentOS

List of all the fonts that are in the Amazon Linux AMI repositories # yum list available font | grep noarch | sed -e “s/noarch.$/noarch/” | sort Install them by this command # yum install -y cjkuni-fonts-common.noarch cjkuni-ukai-fonts.noarch

How to Change or Set System Locales in Linux

How to View System Locale in Linux $ locale LANG=en_US.UTF-8 LANGUAGE=en_US LC_CTYPE=”en_US.UTF-8″ LC_NUMERIC=”en_US.UTF-8″ LC_TIME=”en_US.UTF-8″ LC_COLLATE=”en_US.UTF-8″ LC_MONETARY=”en_US.UTF-8″ LC_MESSAGES=”en_US.UTF-8″ LC_PAPER=”en_US.UTF-8″ LC_NAME=”en_US.UTF-8″ LC_ADDRESS=”en_US.UTF-8″ LC_TELEPHONE=”en_US.UTF-8″ LC_MEASUREMENT=”en_US.UTF-8″ LC_IDENTIFICATION=”en_US.UTF-8″ LC_ALL= $ localectl status System Locale: LANG=en_US.UTF-8 LANGUAGE=en_US VC Keymap: n/a X11 Layout: us X11 Model: pc105… Continue Reading →

How to Configure FTP on AWS EC2

Below are the basic steps to set up an FTP on AWS EC2 instance (I’m using Amazon Linux AMI) Step 1: Getting started Login to your AWS EC2 instance via Terminal sudo yum update -y // To update your server… Continue Reading →

How to Limit Bandwidth in Apache (WAMP/XAMPP)

1. Open httpd.conf, enable this line: LoadModule ratelimit_module modules/mod_ratelimit.so 2. Find DocumentRoot block and add settings like this: 3. Restart Apache Reference: https://youtu.be/lv-8YADwntk

Setting line-ending with GIT

Update Git Config Open file global config (E.g.: C:\Users\yourname\.gitconfig), add like below. 1. Force Git to use LF everywhere [core] eol = lf autocrlf = input 2. Force Git to use CRLF everywhere [core] eol = crlf autocrlf = false… Continue Reading →

Use existing SSH key on a newly installed Ubuntu

If you have a copy of your ssh keys, then simply copy the key files to the ~/.ssh/ directory. E.g., cp /path/to/my/key/id_rsa ~/.ssh/id_rsa cp /path/to/my/key/id_rsa.pub ~/.ssh/id_rsa.pub Change permissions on file sudo chmod 600 ~/.ssh/id_rsa sudo chmod 600 ~/.ssh/id_rsa.pub Start the… Continue Reading →

Run NodeJS Scripts with Windows Task Scheduler

You don’t need all those extra arguments. Just use the following settings: Program/Script: node (or “C:\Proram Files\node\node.exe” if it’s not in your PATH)Arguments: C:\Users\user\folder\script.js References:https://joshuatz.com/posts/2020/using-windows-task-scheduler-to-automate-nodejs-scripts/https://www.dev-tips-and-tricks.com/run-a-node-script-with-windows-task-schedulerhttps://stackoverflow.com/questions/50624380/scheduled-tasks-for-running-scripts-using-node-wont-work

Schedule a nightly reboot Ubuntu

Edit crontab: sudo crontab -e The first time you might have to choose your preferred editor (like vim). 0 4 * * * /sbin/shutdown -r +5 It would reboot your system every day at 4:05am. (4:00am + 5 minutes). Finally,… Continue Reading →

« Older posts

© 2023 HTML Coding World — Powered by WordPress

Theme by Anders NorenUp ↑