Thursday, April 28, 2016

Tạo site wordpress chạy nhanh nhanh bằng Easy Engine

Tạo site wordpress chạy nhanh nhanh bằng Easy Engine
Tạo site wordpress chạy nhanh nhanh bằng Easy Engine

ee site create mysite.org --hhvm --pagespeed --wpredis

Google--pagespeed
Facebook--hhvm
Page Cache--wpredis
Read More

Monday, April 25, 2016

Ẩn text rồi thay thế bằng CSS

Cách 1:


.fusion-secondary-header .fusion-mobile-selector::after {
    content: 'Login';
    padding-left:5px;
}
.fusion-secondary-header .fusion-mobile-selector span {
    display: none;
}
.fusion-secondary-main-menu .fusion-mobile-selector::after {
    content: 'Menu';
    padding-left:5px;
}
.fusion-secondary-main-menu .fusion-mobile-selector span {
    display: none;
}




Cách 2:


#toplevel_page_ab-system .wp-menu-name {
  text-indent: -9999px;
  line-height: 0; /* Collapse the original line */
}

#toplevel_page_ab-system .wp-menu-name::after {
  content: "Appointments";
  text-indent: 0;
  display: block;
  line-height: initial; /* New content takes up original line height */
}

Read More

Thêm Ip tĩnh trên Amazon Server

Tất cả gồm 3 bước:
Bước 1 là: chọn IP động để chuyển đối sang IP tĩnh (Elatic IP)



Bước 2 là: Kết hợp 2 cái lại thành một. Khắc nhập khắc nhập trong cây tre trăm đốt ấy

Bước 3 là: Xác nhận với Amazon là tôi đồng ý. Xong. :D

Read More

Cài đặt Nginx trên Ubuntu để dùng Phalcon

Cài đặt Nginx trên Ubuntu để dùng Phalcon
Cài đặt Nginx trên Ubuntu để dùng Phalcon

#Tải mới phiên bản Ubuntu
apt-get update && apt-get upgrade

#Cài đặt nginx
apt-get install nginx

#Cài đặt Mysql
apt-get install mariadb-server mariadb-client

#Cài đặt bảo mật cho mysql
mysql_secure_installation

#Cài đặt php và extension để bun được phalcon
apt-get install php5-fpm php5-mysql php5-dev php5

#Di chuyển đến nơi chứa thư mục mặt định của web
cd /usr/share/nginx/html

#Nếu bước này không thực hiện thì sẽ không build được phalcon
apt-get install git-core gcc autoconf make libpcre3-dev

#Di chuyển đến thư mục ~ Home
cd ~

#Tạo Swap Ram để cài đặt phalcon nhanh hơn
dd if=/dev/zero of=/swapfile bs=2048 count=1024k
mkswap /swapfile
chmod 600 /swapfile
chown root:root /swapfile
swapon /swapfile

#Kiểm Tra
free -m

#Xoá cache trên ram thật và ram ảo
echo 3 > /proc/sys/vm/drop_caches

#Tải framework phalcon về thưc mục Home
git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/build/
./install

#Tạo thêm file phalcon.ini
cd /etc/php5/mods-available/
nano phalcon.ini
cd ..

#Chép qua thư mục cli nữa
cd cli/

#Đây là câu lệnh tạo file shortcut
ln -s /etc/php5/mods-available/phalcon.ini .

#Chép qua thư mục conf.d
cd conf.d/
ln -s /etc/php5/mods-available/phalcon.ini .

#Chép qua thưc mục fpm
cd fpm/
ln -s /etc/php5/mods-available/phalcon.ini .
cd conf.d/
ln -s /etc/php5/mods-available/phalcon.ini .

#Khởi động lại php
service php5-fpm restart

#Tạo thêm file config
cd /etc/nginx/sites-available/

#Copy thêm mới 1 file từ file cũ
cp default phalcon.demo

#Mở lên bằng nano
nano phalcon.demo
service nginx reload
nano phalcon.demo

#Di chuyển đến html thư mục
cd /usr/share/nginx/html/

#Tạo thư mục phalcon.demo để chứa source
mkdir phalcon.demo
#Sau đó bỏ 1 file html tuỳ ý vào

#Tạo shortcut cho tệp tin config để nginx reload được
/etc/nginx/sites-available/phalcon.demo /etc/nginx/sites-enabled/

service nginx reload

#Cài đặt phalcon Dev
clone https://github.com/phalcon/phalcon-devtools.git

git clone https://github.com/phalcon/phalcon-devtools.git
/opt/phalcon-devtools/
Read More

Chỉnh Phalcon khi dùng Nginx trên Ubuntu 14.02

Chỉnh Phalcon khi dùng Nginx trên Ubuntu 14.02
Chỉnh Phalcon khi dùng Nginx trên Ubuntu 14.02

server {
        listen 80;
        #listen [::]:80 default_server ipv6only=on;

        root /usr/share/nginx/html/namefolder/public;
        index index.php index.html index.htm;
        server_name domain;



 # Chức năng này để giúp Nginx bật mod_rewrite


       location / {
                try_files $uri $uri/ /index.php?_url=$uri&$args;
        }





 

        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
        }

}
Read More

Friday, April 22, 2016

Sửa lỗi FontAwesome trên theme Blogger






Read More

Tập tin được tải lên có dung lượng vượt quá hạn mức quy định bởi cài đặt upload_max_filesize trong tập tin php.ini.

Tập tin được tải lên có dung lượng vượt quá hạn mức quy định bởi cài đặt upload_max_filesize trong tập tin php.ini.
Tập tin được tải lên có dung lượng vượt quá hạn mức quy định bởi cài đặt upload_max_filesize trong tập tin php.ini.

Tập tin được tải lên có dung lượng vượt quá hạn mức quy định bởi cài đặt upload_max_filesize trong tập tin php.ini.

Cái này là vì php không cho phép upload dung lượng quá mức, cách giải quyết là dùng FTP.

Đăng nhập ftp, sau đó đưa file zip lên folder của plugin của wordpress, giải nén nó ra.

Đáp án của khi không Add New và Upload  && chỉnh web-server và php là dùng: FTP account.

Read More

Wednesday, April 20, 2016

Vợ Yêu | Do tự tui hát

Read More

Tuesday, April 19, 2016

Thần Thoại Trăng Sao | LT3

Read More

Sinh nhật của Sophie










Read More

Cách tạo Fanpage của Facebook hợp lí cho cửa hàng buôn bán

Read More

Mẫu tin nhắn gởi cho khách hàng bằng tiếng Anh

Mẫu tin nhắn gởi cho khách hàng bằng tiếng Anh
Mẫu tin nhắn gởi cho khách hàng bằng tiếng Anh

Hi LongLiuLo,
We just sent to you the invoice for Blooger website.
Pls check your email leongreetdawn@gmail.com.
When u made the payment. Kindly show proof payment here, Thank you.

Dear LongLiuLo,

This is a statement notice that your invoice for Blooger website.
Please see details at the attached link.
Services:
-
-
Total: $1,000.00
Thanks and Best Regards,
Leon
Read More

cat tail head

cat tail head
cat tail head

### Cat from x to y line cat -n /root/Dropbox/KISS/KISS | tail -n +10 | head -n 10
Read More

Cách tạo Swap Ram ảo cho VPS Ubuntu

Cách tạo Swap Ram ảo cho VPS Ubuntu
Cách tạo Swap Ram ảo cho VPS Ubuntu


### Swap Ram
free -m
dd if=/dev/zero of=/swapfile bs=1024 count=1024k
mkswap /swapfile
chmod 600 /swapfile
chown root:root /swapfile
swapon /swapfile
nano /etc/fstab
/swapfile none swap sw 0 0 swapoff -v /swapfile rm /etc/fstab
Read More

Lệnh xoá bộ nhớ tạm cho Ram Linux

Lệnh xoá bộ nhớ tạm cho Ram Linux
Lệnh xoá bộ nhớ tạm cho Ram Linux

### Clean RAM echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
Read More

Cài đặt và cấu hình tài khoản FTP cho VPS Cloud Ubuntu

Cài đặt và cấu hình tài khoản FTP cho VPS Cloud Ubuntu
Cài đặt và cấu hình tài khoản FTP cho VPS Cloud Ubuntu


### Install FTP Account 
##http://unix.stackexchange.com/questions/83221/how-to-create-a-ftp-user-with-specific-dir-access-only-on-a-centos-linux-ins #www-data
passwd www-data
nano /etc/passwd www-data:x:33:33:www-data:/var/www:/bin/bash
nano /etc/ssh/sshd_config
#PasswordAuthentication yes
service ssh restart
#newuser
adduser leon
passwd leon
chown -R leonnguyen /folder
usermod -d /folder/ leon
Read More

Cấu hình thư mục chứa tệp tin của web-server Apache cho VPS Ubuntu

Cấu hình thư mục chứa tệp tin của web-server Apache cho VPS Ubuntu
Cấu hình thư mục chứa tệp tin của web-server Apache cho VPS Ubuntu

### httpd vitualhost config ##https://www.youtube.com/watch?v=Kfqv5GJ8sco #Create folder contains domain name mkdir site-list #Open httpd.conf main file nano httpd.conf #Insert folder loading file config IncludeOptional sites-list/*.conf #Reload httpd force-reload
Read More

Cài đặt và cấu hình Php myadmin cho VPS Ubuntu 14.02



### Install phpmyadmin ubunntu 14.02
apt-get install phpmyadmin
php5enmod mcrypt
service apache2 restart
nano /etc/phpmyadmin/apache2.conf
nano /etc/apache2/apache2.conf
apt-get install mcrypt
nano /usr/share/phpmyadmin/.htaccess
#Insert
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/phpmyadmin/.htpasswd
Require valid-user

apt-get install apache2-utils
htpasswd -c /etc/phpmyadmin/.htpasswd longliulo
Read More

Cách sử dụng Git cho Bitbucket - Lệnh cơ bản

Cách sử dụng Git cho Bitbucket - Lệnh cơ bản
Cách sử dụng Git cho Bitbucket - Lệnh cơ bản

git clone https://username@bitbucket.org/username/folk_name.git
git remote add upstream https://username@bitbucket.org/docom/name.git
git remote -v
git pull upstream master
git config --global user.name "username"
git config --global user.email youraccount@gmail.com
git add --all
git commit -m 'about'
git push
git pull upstream master
git status
git reset HEAD~1
Read More

Monday, April 18, 2016

Cài Đặt Nginx Webserver trên Ubuntu 14.02

### Install nginx Easy Engine


Step 1: Open Port in Server

22/TCP (Inbound/Outbound) : Standard SSH port
80/TCP (Inbound/Outbound) : Standard HTTP port
443/TCP(Inbound/Outbound) : Standard HTTPS port
22222/TCP (Inboud) : To access EasyEngine admin tools
11371/TCP (Outbound) : To connect to GPG Key Server

Step 2: Connect Server
ssh -i leonnguyen.pem ubuntu@54.254.134.128

Step 3: Update Ubuntu && Install EE

wget -qO ee rt.cx/ee && sudo bash ee # install easyengine
sudo ee site create example.com --wp # install wordpress on example.com

## https://easyengine.io/docs/commands/stack/
# Install web packages
ee stack install


#Clean NGINX FastCGI cache, Opcacache, Memcache
ee clean --all

#Create site
ee site create nameweb --wpfc --pagespeed --user=admin --pass=alo123

##https://easyengine.io/docs/commands/secure/
#Changing HTTP authentication credentials
ee secure --auth [Optional user name] [Optional password]

#Changing Admin Port
ee secure --port [Optional port no]

# Disable cache config file
#
# include common/wpfc.conf;
include common/php.conf;
Read More