The logging class courtesy of https://github.com/thielicious/Logger
class Logger {
private
$file,
$timestamp;
public function __construct($filename) {
# 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); |
#!/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 ) |
/* | |
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 MIT License | |
Copyright (c) 2010 Roger Chapman | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
The logging class courtesy of https://github.com/thielicious/Logger
class Logger {
private
$file,
$timestamp;
public function __construct($filename) {
// Copyright Stephen Feather and other contributors. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a | |
// copy of this software and associated documentation files (the | |
// "Software"), to deal in the Software without restriction, including | |
// without limitation the rights to use, copy, modify, merge, publish, | |
// distribute, sublicense, and/or sell copies of the Software, and to permit | |
// persons to whom the Software is furnished to do so, subject to the | |
// following conditions: | |
// |
#!/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 |
/*jslint vars: true, sloppy: true, nomen: true, maxerr: 1000 */ | |
function LatLon(lat, lon, rad) { | |
if (typeof(rad) == 'undefined') rad = 6371; // earth's mean radius in km | |
// only accept numbers or valid numeric strings | |
this._lat = typeof(lat)=='number' ? lat : typeof(lat)=='string' && lat.trim()!='' ? +lat : NaN; | |
this._lon = typeof(lon)=='number' ? lon : typeof(lon)=='string' && lon.trim()!='' ? +lon : NaN; | |
this._radius = typeof(rad)=='number' ? rad : typeof(rad)=='string' && trim(lon)!='' ? +rad : NaN; | |
} |
04d13ee4564f01142758f002d6b3069e7bfccf6d6ed92b8352e4782c9ceedddac7a38ed4109da157c27888d4318552a3738a07ef9910ebc9e8c1bbdfc56aea4e4a |
// Copyright Stephen Feather and other contributors. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a | |
// copy of this software and associated documentation files (the | |
// "Software"), to deal in the Software without restriction, including | |
// without limitation the rights to use, copy, modify, merge, publish, | |
// distribute, sublicense, and/or sell copies of the Software, and to permit | |
// persons to whom the Software is furnished to do so, subject to the | |
// following conditions: | |
// |