dism /online /cleanup-image /restorehealth /Source:<knowngood>
- Then,
sfc /scannow
- Then, reboot
- Stop Update Services:
net stop wuauserv
net stop bits
- Delete Downloaded Update Files:
# Usage: python3 add_dynamodb_field.py | |
import boto3 | |
import time | |
import sys | |
def get_epoch_timestamp(): | |
return int(time.time()) | |
def prompt_user(): |
#!/bin/bash | |
# Usage: bash check_dynamo_regions.sh | |
echo "Checking DynamoDB tables in all AWS regions..." | |
# Get list of enabled regions | |
regions=$(aws ec2 describe-regions --query "Regions[*].RegionName" --output text) | |
for region in $regions; do |
/** | |
* Display the user's current roles on their 'Edit Profile' screen in the WP dashboard. | |
* | |
* @param WP_User $user The current WP_User object. | |
*/ | |
function display_user_roles_on_profile($user) { | |
// Get the user's roles | |
$roles = $user->roles; | |
// Get global WP_Roles object |
rclone sync "C:\Users\USERNAME\folder" "F:\backups\folder" -P --create-empty-src-dirs --ignore-errors
rclone sync "C:\Users\USERNAME\AppData\Local\CapCut\User Data\Projects\com.lveditor.draft" "SMB_REMOTE_NAME:f\CapCut Projects Backup" -P --create-empty-src-dirs --ignore-errors
rclone sync Personal-Google-Photos: "F:\Google Photos" -P --create-empty-src-dirs
flutter doctor
in PowerShell and follow the prompts until it's happy to build Android apps (you'll likely need to install command line tools from the Android SDK manager, and then run flutter doctor --android-licenses
)<?php | |
// Complete order if it was a credit card order or other instant payment type | |
add_action( 'woocommerce_payment_complete', function ( $order_id ) { | |
$order = new WC_Order( $order_id ); | |
//$payment_type = $order->get_payment_method_title(); | |
// No updated status for orders delivered with Bank wire, Cash on delivery and Cheque payment methods. | |
if ( in_array( $order->get_payment_method(), array( 'bacs', 'cod', 'cheque', '' ) ) ) { | |
// Credit: https://stackoverflow.com/a/35689563 |
// Source block markup can be retrieved from the posts table in the database after you configure a block on a page | |
$your_block = '<!-- wp:heading {"level":1} --> | |
<h1>Heading 1</h1> | |
<!-- /wp:heading -->'; | |
$parsed_blocks = parse_blocks( your_block ); | |
if ( $parsed_blocks ) { | |
foreach ( $parsed_blocks as $block ) { | |
echo render_block( $block ); |
# Ensure python3 is install via brew | |
brew install python | |
# Check that it's showing up in terminal | |
which python3 | |
# If there's anything about python already in /usr/local/bin , delete it | |
sudo rm -rf /usr/local/bin/python3 | |
# Link the new install to that old location |
<?php | |
// Takes in a post_id and finds all ancestor/parent pages, and | |
// then finds all child pages. Returns the family tree in an array and notes what level | |
// the current post_id is located in. | |
function get_all_parent_and_child_pages( $post_id ) { | |
$ancestry_array = [ | |
'ancestors_top_to_curr' => [] | |
]; |