This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The default server | |
| # | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| location / { | |
| root /var/www/html; | |
| index index.php index.html index.htm; | |
| try_files $uri $uri/ /index.php?q=$uri&$args; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Start a new pool named 'www'. | |
| [www] | |
| ; The address on which to accept FastCGI requests. | |
| ; Valid syntaxes are: | |
| ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on | |
| ; a specific port; | |
| ; 'port' - to listen on a TCP socket to all addresses on a | |
| ; specific port; | |
| ; '/path/to/unix/socket' - to listen on a unix socket. | |
| ; Note: This value is mandatory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd ~ | |
| sudo yum update -y | |
| sudo yum install epel-release -y | |
| # install php and nginx | |
| sudo yum --enablerepo=remi,remi-php70 install -y nginx php-fpm php-common -y | |
| sudo yum --enablerepo=remi,remi-php56 install -y php-opcache php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-pecl-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml - y | |
| sudo systemctl stop httpd.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # get params | |
| while getopts s:d: option | |
| do | |
| case "${option}" | |
| in | |
| s) SSH_KEY=${OPTARG};; | |
| d) DOMAIN=${OPTARG};; | |
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| clear | |
| echo "============================================" | |
| echo "WordPress Install Script" | |
| echo "============================================" | |
| echo "Database Name: " | |
| read -e dbname | |
| echo "Database User: " | |
| read -e dbuser | |
| echo "Database Password: " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ####################################################### | |
| # HocVPS Script v2.0.4 for CentOS 7 | |
| # To install type: | |
| # curl -sO https://hocvps.com/install && bash install | |
| # or | |
| # curl -sO https://hocvps.com/scripts/$(rpm -E %centos)/install && bash install | |
| ####################################################### | |
| hocvps_version="2.0.4" | |
| phpmyadmin_version="4.8.0.1" # Released 2018-04-19. Future version compatible with PHP 5.5 to 7.2 and MySQL 5.5 and newer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm i -s @zeit/next-sass @zeit/next-less node-sass | |
| next.config.js | |
| const withSass = require('@zeit/next-sass') | |
| const withLess = require('@zeit/next-less') | |
| const isProd = process.env.NODE_ENV === 'production' | |
| // fix: prevents error when .less files are required by node | |
| if (typeof require !== 'undefined') { | |
| require.extensions['.less'] = file => { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Display an error message at the top of the post edit screen explaining that ratings is required. | |
| * | |
| * Doing this prevents users from getting confused when their new posts aren't published, as we | |
| * require a valid rating custom taxonomy. | |
| * | |
| * @param WP_Post The current post object. | |
| */ | |
| function show_required_field_error_msg( $post ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Source: https://gist.github.com/luetkemj/2023628 | |
| // Xem hướng dẫn WP_Query toàn tập: http://goo.gl/kRpzTz | |
| <?php | |
| $args = array( | |
| //////Author Parameters - Tham số lấy bài viết theo tác giả | |
| //http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters | |
| 'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20) | |
| 'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả | |
| 'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả |
OlderNewer