This is the sequence of steps to follow to create a root gh-pages
branch. It is based on a question at [SO]
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
<?php | |
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯ | |
/** | |
* Prevent update notification for plugin | |
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/ | |
* Place in theme functions.php or at bottom of wp-config.php | |
*/ | |
function disable_plugin_updates( $value ) { |
I am running a WordPress multisite network with sub-directory setup. When I check my error.log file, it is full of entries like this one:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'Limit InternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
The problem was, in my case, one specific rewrite rule in the .htaccess file.
# WP Config Settings | |
wp config set AUTOMATIC_UPDATER_DISABLED true | |
wp config set CORE_UPGRADE_SKIP_NEW_BUNDLED true | |
# Changing Site URL to https | |
wp option get siteurl | sed "s/http:/https:/g" | xargs -I {} wp option update siteurl {} | |
wp option get home | sed "s/http:/https:/g" | xargs -I {} wp option update home {} | |
# Install themes & plugins |
addEventListener("fetch", event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
let body = {}; | |
async function handleRequest(request) { | |
let content = "just drop if it fails...okay ?"; | |
for( var i of request.headers.entries() ) { | |
content += i[0] + ": " + i[1] + "\n"; | |
} | |
let respContent = ""; |
This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.
Backup all of your current databases with mysqldump
This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.
<iframe src="http://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true" style="width:100%; height:1000px;" frameborder="0"></iframe> |
if( function_exists('oxygen_vsb_register_condition') ) { | |
global $oxy_condition_operators; | |
// Condition to check if a URL parameter is present. | |
oxygen_vsb_register_condition('URL Param Exists', array('options'=>array(), 'custom'=>true), array('--'), 'oxy_url_param_exists_callback', 'Other'); | |
function oxy_url_param_exists_callback($value, $operator) { | |
if( isset($_GET[$value]) && $_GET[$value] ) { |
<?php | |
/** | |
* @file | |
* Demo module, Basic Ajax form submit (Ajax framework). | |
*/ | |
/** | |
* Implements hook_menu(). | |
*/ |
Date: select first date | |
StartOfDateWeek: fromTimestamp(timestamp(prop("Date")) - (((day(prop("Date")) == 0) ? 7 : ((day(prop("Date")) - 1) * 24 + toNumber(formatDate(prop("Date"), "H")))) * 60 + toNumber(formatDate(prop("Date"), "m"))) * 60 * 1000) | |
WeeksFromOriginal: ceil(dateBetween(now(), prop("Date"), "days") / 7) | |
NearestDate: dateAdd(prop("Date"), prop("WeeksFromOriginal"), "weeks") | |
Whenever it's 24 hours from last event, NearestDate should update to same + 7 days. |