start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import argparse | |
| import logging | |
| from datetime import datetime, timedelta | |
| from typing import List, Optional | |
| from collections import defaultdict |
| <?php | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |
When setting these options consider the following:
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log| #!/bin/sh | |
| # PATH TO YOUR HOSTS FILE | |
| ETC_HOSTS=/etc/hosts | |
| # DEFAULT IP FOR HOSTNAME | |
| IP="127.0.0.1" | |
| # Hostname to add/remove. | |
| HOSTNAME=$1 |
| <?php | |
| /** | |
| * Get a post object by its post name (slug). | |
| * | |
| * @param string $slug The post name value. | |
| * @param string $post_type The post type to fetch from. Default: 'post'. | |
| * | |
| * @return \WP_Post|bool The post object if found, false if not. | |
| */ |
| <?php | |
| /** | |
| * WordPress Ajax Process Execution | |
| * | |
| * This file is a near-identical copy of {@see wp-admin/admin-ajax.php} from WordPress v6.3.0. | |
| * | |
| * Differences: | |
| * 1. Constant `WP_ADMIN` is set to FALSE, by default. | |
| * 2. WordPress action 'admin_init' is replaced with custom action 'ajax_init'. | |
| * 4. Custom actions hooked on 'admin_init' are not executed. |