This file contains 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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
This file contains 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 | |
/** | |
* 使用 Instagram (Facebook) API 取得用戶圖文的方法,翻譯自原文: https://www.gsarigiannidis.gr/instagram-feed-api-after-june-2020/ | |
* | |
* @param $token // 存取權杖 | |
* @param $user // 用戶編號,查詢工具: https://developers.facebook.com/tools/debug/accesstoken/ | |
* @param int $limit // 查詢圖文筆數(不建議設定太多). | |
* @param string $fields // 其他欄位參考: https://developers.facebook.com/docs/instagram-basic-display-api/reference/media | |
* @param array $restrict // 取得媒體類型: IMAGE, VIDEO, CAROUSEL_ALBUM | |
* |
This file contains 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
// import_json_appsscript.js | |
// https://gist.github.com/allenyllee/c764c86ed722417948fc256b7a5077c4 | |
// | |
// Changelog: | |
// (Oct. 16 2019) tag: allenyllee-20191016 | |
// 1. Fixed google script error: urlfetchapp - service invoked too many times https://stackoverflow.com/questions/10598179/google-apps-script-urlfetchapp-service-invoked-too-many-times | |
// (Jul. 16 2018) tag: allenyllee-20180716 | |
// 1. Fixed the issue "If you try to query /arrayA[k]/arrayB[n]/arrayC[m]/.../member, you will always get /arrayA[k]/arrayB[k]/arrayC[k]/.../member." | |
// (Nov. 30 2017) tag: allenyllee-20171130 | |
// 1. Add the ability to query array elements by using xpath like "/array[n]/member" where "n" is array index |
This file contains 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
# Welcome to the lightsail-wordpress-cluster wiki! | |
## Instructions, commands and code snippets to use and follow along the Video Tutorial on YouTube. | |
## Create Four LightSail Ubuntu Servers with the appropriate sizing. Name Three instances WP1, WP2, WP3, and name 4th instance LoadBalancer | |
## | |
## Open Ports 443 and 9443 (on LoadBalancer and WP1 in the LightSail Instance networking section) | |
## Run all commands with root (sudo su) | |
### Run following on each of the 3 WordPress instances | |
`ufw allow 80,443,9443,3306,4444,4567,4568/tcp;` |
This file contains 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
/** | |
* HOW-TO | |
*/ | |
// same param as $.ajax(option); see http://api.jquery.com/jQuery.ajax/ | |
$.ajaxQueue.addRequest(option); | |
// start processing one by one requests | |
$.ajaxQueue.run(); |
This file contains 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 | |
/** | |
* This little class records how long it takes each WordPress action or filter | |
* to execute which gives a good indicator of what hooks are being slow. | |
* You can then debug those hooks to see what hooked functions are causing problems. | |
* | |
* This class does NOT time the core WordPress code that is being run between hooks. | |
* You could use similar code to this that doesn't have an end processor to do that. | |
* |
OlderNewer