Skip to content

Instantly share code, notes, and snippets.

View rafaelmaeuer's full-sized avatar

Rafael M. rafaelmaeuer

View GitHub Profile

To avoid any misunderstandings, I'm talking about stuff that you would find under

/Library/SystemExtensions/

Usually sitting in a folder with a cryptic folder named like AAHHV55HIWJF&VHDI9 and often containing an item like com.nordvpn.macOS.Shield.systemextension.

This is not about the Finder extensions that you would normally find in the System Settings app.

It is actually in my case said NordVPN Shield system extensiont that I just couldn't remove even using sudo via the Terminal. Here's what to do (only works on Intel Macs, I don't know how to get into recovery mode on Apple Silicon Macs).

services:
frontend:
image: frontend
profiles: [frontend]
phpmyadmin:
image: phpmyadmin
depends_on: [db]
profiles: [debug]
<!-- in functions.php add -->
function debug_cf7_add_error( $items, $result )
{
if ( 'mail_failed' == $result['status'] ) {
// invoke global phpmailer object
global $phpmailer;
// append error info to ajax response.
$items['errorInfo'] = $phpmailer->ErrorInfo;
}
return $items;

To call a function from your HTML file, include a script tag that references your JavaScript file, like above. Then, in your JavaScript file, define the function and attach it to the global object (e.g., window):

// your-script.js
function myFunction() {
  // function implementation
}
window.myFunction = myFunction;

In your HTML file, you can then call the function using its global name:

You can pass arguments to avoid getting prompts. This works for me;

apt-get update
apt-get --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

--force-confold (my choice) will make these "What do you want to do about modified configuration file" questions default to N (keep your currently-installed version)

find public_html/wp-includes/class-wp-widget-factory.php and look at lines 62,63,64

        $this->widgets[ $widget ] = new $widget();
    }
}

if that is what you see then highlight all 3 lines and replace it with

ls /etc/apt/sources.list.d
sudo rm -f /etc/apt/sources.list.d/myppa.list
var sleepSetTimeout_ctrl;
function sleep(ms) {
clearInterval(sleepSetTimeout_ctrl);
return new Promise(resolve => sleepSetTimeout_ctrl = setTimeout(resolve, ms));
}
await sleep(<duration>);
const object = {a:2, b:4, c:6, d:8};
Object.entries(object).forEach(([key, value], index) => {
console.log(`${index}: ${key} = ${value}`);
});