Redirect link

Single Hop http to https for non-www or www Domain with .htaccess If you are behind a reverse proxy like Cloudflare or nginx this condition can help make sure the redirect is triggered RewriteCond %{HTTP:X-Forwarded-Proto} !https Final destination: #BEGIN force https from <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTP_HOST} ^(www\.)?hammerpedia\.com [NC] RewriteRule ^(.*)$$1 …

Redirect link Read More »

LetsEnscrypt SSL

Cài đặt chứng chỉ Let’s Encrypt SSL trên server HocVPS Script # Stop Nginx service nginx stop # Issue SSL Let’s Encrypt /opt/letsencrypt/certbot-auto certonly –standalone #Check nginx syntax nginx -t #Restar Nginx service nginx restart  

Add SSHkey to VPS Create .ssh folder in root foder mkdir -p ~/.ssh echo public_key_string >> ~/.ssh/authorized_keys Phần quyền, chỉ root account mới có thể access. chmod -R go= ~/.ssh    

How To Install WordPress on Linux/CentOS 7   Step Two — Install WordPress Before we download WordPress, there is one PHP module that we need to install to ensure that it works properly. Without this module, WordPress will not be able to resize images to create thumbnails. We can get that package directly from CentOS’s default repositories using yum: sudo …

How To Install WordPress on Linux/CentOS 7 Read More »

Emmet hotkey sublime text 3

{ “keys”: [“ctrl+t”], “command”: “new_file” }, { “keys”: [“shift+alt+e”], “command”: “open_dir”, “args”: {“dir”: “$file_path”, “file”: “$file_name”}}, { “keys”: [“ctrl+alt+p”], “command”: “prompt_select_workspace”}, { “keys”: [“ctrl+shift+r”], “command”: “reindent” , “args”: { “single_line”: false }}, { “keys”: [“alt+r”], “command”: “reveal_in_side_bar”}, { “keys”: [“shift+ctrl+g”], “command”: “emmet_wrap_with_abbreviation”, “context”: [{“key”: “setting.is_widget”, “operand”: false }] }, { “keys”: [“ctrl+alt+j”], “command”: “emmet_go_to_tag_pair” }, …

Emmet hotkey sublime text 3 Read More »

Learning Javascipt

Create Object (tạo đối tượng) có 2 cách Object literals //đối tượng có 1 thuộc tính và 1 phương thức (method) var myCar = { brand: ‘Toyota’, run: function(){ console.log(‘running’); } }; Object constructor //Tạo 1 đối tượng mới var myApple = new Object(); //Thêm các thuộc tính cho đối tượng myApple.color = ‘red’; myApple.shape …

Learning Javascipt Read More »