The logging class courtesy of https://github.com/thielicious/Logger
class Logger {
private
$file,
$timestamp;
public function __construct($filename) {
04d13ee4564f01142758f002d6b3069e7bfccf6d6ed92b8352e4782c9ceedddac7a38ed4109da157c27888d4318552a3738a07ef9910ebc9e8c1bbdfc56aea4e4a |
#!/usr/local/bin/zsh | |
echo "Updating Homebrew" | |
brew update | |
brew upgrade | |
brew cask upgrade | |
brew cleanup -s | |
brew doctor | |
brew missing | |
echo "Updating App Store Items" | |
mas outdated |
#!/bin/bash | |
# | |
# Designed to organize files into | |
# sub folders to a depth of X based | |
# upon the first X letters of the file name | |
# Currently --depth does not work | |
/* | |
This is a query to return a post.ID, post.post_title, and the SKU of | |
products that do not have an attached image. The vendor, as associated through | |
wp-all-import into an ACF field, can be adjusted as needed. | |
*/ | |
USE featherarms; | |
SET @vendor = 'CSSI' COLLATE utf8mb4_unicode_ci; | |
SELECT fa_posts.ID, fa_posts.post_title, fa_postmeta1.meta_value as SKU | |
FROM fa_posts | |
LEFT OUTER JOIN fa_postmeta pm ON (fa_posts.ID=pm.post_id AND pm.meta_key = '_thumbnail_id') |
The logging class courtesy of https://github.com/thielicious/Logger
class Logger {
private
$file,
$timestamp;
public function __construct($filename) {
#!/usr/bin/bash | |
BASE_URL="https://myourdomain.com/files/" | |
# We need to be able to trap breakouts | |
trap exit_script INT | |
function exit_script() { | |
end=`date +%s.%N` | |
runtime=$( echo "$end - $start" | bc -l ) |
# Courtesy of Prosti (https://wordpress.stackexchange.com/users/88606/prosti) | |
# Context (https://wordpress.stackexchange.com/a/250293/215668) | |
function _20161224_printer( $r ){ | |
$line = microtime(true)*10000 . ' ' . $r . "\n"; | |
$fp = fopen( ABSPATH . 'hooks.txt', 'a+'); | |
fwrite($fp, $line); | |
fclose($fp); |
UPDATE wp_postmeta | |
SET meta_value = REPLACE(meta_value, 'FA-', '') | |
WHERE meta_key = '_sku' | |
AND meta_value LIKE 'FA-%' | |
ORDER BY post_id DESC | |
LIMIT 10000; |
#!/bin/bash | |
# | |
# upload_and_run.sh | |
# Author: Stephen Feather | |
# Copyright (c) 2023 Stephen Feather | |
# License: CC BY-SA 4.0 | |
if [ -z "$1" ]; then | |
echo "Error: URL argument is required." |
<deviceMapping backends="rawInput;directInput;macosXSdl"> | |
<productKey productId="1422" vendorId="1038" /> | |
<productName vendorId="1038"> | |
<keyword text="nimbus+" /> | |
</productName> | |
<category>gamepad</category> <!-- gamepad, wheel, joystick, farmWheel, farmSidePanel --> | |
<buttonMappings> | |
<buttonMapping physical="0" logical="0" label="A" /> | |
<buttonMapping physical="1" logical="1" label="B" /> | |
<buttonMapping physical="2" logical="2" label="X" /> |