Backup file config của Apache bằng lệnh dưới:
sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.backup.conf
Chỉnh sửa file config bằng lệnh dưới:
| function sendsms() | |
| { | |
| try | |
| { | |
| var label = GmailApp.getUserLabelByName('sendsms'); | |
| var threads = label.getThreads(); | |
| var now = new Date().getTime(); | |
| var cal=getCalendar(); | |
| for(i in threads) |
| ## LEVERAGE BROWSER CACHING ## | |
| <IfModule mod_expires.c> | |
| ExpiresActive On | |
| ExpiresByType image/jpg "access 1 year" | |
| ExpiresByType image/jpeg "access 1 year" | |
| ExpiresByType image/gif "access 1 year" | |
| ExpiresByType image/png "access 1 year" | |
| ExpiresByType text/css "access 1 month" | |
| ExpiresByType application/pdf "access 1 month" | |
| ExpiresByType application/x-javascript "access 1 month" |
| // Enable WP_DEBUG mode | |
| define('WP_DEBUG', true); | |
| define('WP_DEBUG_LOG', true); | |
| define('WP_DEBUG_DISPLAY', false); | |
| @ini_set('display_errors',0); |
| <?php # -*- coding: utf-8 -*- | |
| // function remove_accents() | |
| /** | |
| * Unaccent the input string string. An example string like `ÀØėÿᾜὨζὅБю` | |
| * will be translated to `AOeyIOzoBY`. More complete than : | |
| * strtr( (string)$str, | |
| * "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ", | |
| * "aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn" ); | |
| * |
| <?php | |
| /** | |
| * Plugin Name: Add Blog and User ID on Network | |
| * Plugin URI: http://wpengineer.com/2188/view-blog-id-in-wordpress-multisite/ | |
| * Description: View Blog and User ID in WordPress Multisite | |
| * Version: 1.0.0 | |
| * Author: Frank Bültge | |
| * Author URI: http://bueltge.de | |
| * License: GPLv3 | |
| */ |
| Mở file wp-config.php | |
| Tìm: define('WPLANG', ''); | |
| Thêm bên dưới: | |
| define('WP_POST_REVISIONS', false ); // Tắt bản ghi tạm thời tránh nặng DB | |
| define('AUTOSAVE_INTERVAL', 240 ); // Để chế độ tự động lưu thành 4 phút | |
| define('DISALLOW_FILE_EDIT',true); // Tắt chế độ sửa theme/plugin của admin | |
| define('WP_MEMORY_LIMIT', '64M'); |
| Run this command below on your server and it will replace all of the archive.ubuntu.com and security.ubuntu.com package repository URLs with old-releases.ubuntu.com | |
| sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list | |
| You may also want to see if there are other files in /etc/apt/sources.list.d/ that need to be updated, which can be done with a simple grep command: | |
| grep -E 'archive.ubuntu.com|security.ubuntu.com' /etc/apt/sources.list.d/* |
| module Jekyll | |
| class ArchiveGenerator < Generator | |
| safe true | |
| def generate(site) | |
| collate_by_month(site.posts).each do |month, posts| | |
| page = ArchivePage.new(site, month, posts) | |
| site.pages << page | |
| end | |
| end |
| module Jekyll | |
| class ArchivePage | |
| include Convertible | |
| attr_accessor :site, :pager, :name, :ext, :basename, :dir, :data, :content, :output | |
| # Initialize new ArchivePage | |
| # +site+ is the Site | |
| # +month+ is the month | |
| # +posts+ is the list of posts for the month |