Showing posts from May, 2019

HTML Character Sets

HTML Character Sets

ISO-8859-1 :
UTF-8 :

The Difference Between Unicode and UTF-8

Unicode is a character set. UTF-8 is encoding. Unicode is a list of characters with unique decimal numbers (code points). A = 65, B = 66, C = 67, .... This list of decimal numbers represent the string "hello": 104 101 108 108 111 Encoding is how these numbers are translated into binary numbers to be stored in a computer: UTF-8 encoding will store "hello" like this (binary): 01101000 01100101 01101100 01101100  01101111

How to Manage Processes from the Linux Terminal: 10 Commands You Need to Know

The Linux terminal has a number of useful commands that can display running processes, kill them, and change their priority level. This post lists the classic, traditional commands, as well as some more useful, modern ones. Many of the commands here perform a single function and can be combined — that’s the Unix philosophy of designing programs. Other programs, like htop, provide a friendly interface on top of the commands.
top The top command is the traditional way to view your system’s resource usage and see the processes that are taking up the most system resources. Top displays a list of processes, with the ones using the most CPU at the top.
To exit top or htop, use the Ctrl-C keyboard shortcut. This keyboard shortcut usually kills the currently running process in the terminal. htop The htop command is an improved top. It’s not installed by default on most Linux distributions — here’s the command you’ll need to install it on Ubuntu: sudo apt-get install htop
htop displays the sa…

Setup Django behind uWSGI and NGINX on CentOS 7

Setting up a web server for Django could be challenging and headache. Let’s try to make it simple: Django behind uWSGI and NGINX on CentOS 7 from scratch. At the end, our complete stack of components will look like this: the web client <-> the web server <-> the socket <-> uwsgi <-> Django 1. Install Dependencies 1.1. NGINX yum install epel-release -y
yum install nginx -y 1.2. Python 3 & PIP yum install python34-devel gcc -y
curl -O
/usr/bin/python3.4 1.3. Create VirtualEnv with Python3 pip install virtualenv
mkdir -p /var/www && cd /var/www
virtualenv -p python3 p3venv If you are up-to-dated person, you can install 3.6.2 (latest python version as of now – Aug 28, 2017) follow this instruction 1.4. Install uWSGI & Django # Activate virtual environment
source p3venv/bin/activate
pip install uwsgi
pip install django 2. Configuratio…