Skip to content

Instantly share code, notes, and snippets.

View devidw's full-sized avatar
🌌
realizing reality

David Wolf devidw

🌌
realizing reality
View GitHub Profile
@devidw
devidw / make-dot-com-ips.adoc
Last active August 1, 2022 08:39
make.com outbound IP-Addresses for whitelisting

Whitelist only make.com IPs for internal scenario execution

Paste into the IP restrictions setting of custom webhook modules, if used only internally inside make.com, when triggering one scenario from another one using the http module.

54.209.79.175,54.80.47.193,54.161.178.114,54.75.157.176,54.78.149.203,52.18.144.195,44.196.246.20,3.94.51.90,52.4.48.212,3.125.27.86,3.68.125.41,18.193.24.45
@devidw
devidw / wc-variation-linking.js
Last active May 7, 2023 07:57
WooCommerce direct variation URL for variable products
/**
* Little JS snippet to automatically update the WooCommerce single product page URL with the needed parameters for the active variations' selection.
*
* Each time the user changes the variation selection, the URL is updated with the new parameters, so on hard refresh the selected variation is displayed.
*
* Also, fast way to get the direct URL to the selected variation.
*
* Paste it into your browser console and run it. Or use it in your theme/plugins.
*
* @see https://stackoverflow.com/a/73138077/13765033
<?php
/**
* Move the product meta to the attributes table on the single product page.
*/
// Remove the product meta box.
// This has to be placed inside the theme's functions.php file.
// Won't work if placed inside a plugin.
// remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
@devidw
devidw / seafile-deactivate-user.sh
Last active April 11, 2023 18:08
How to deactivate a Seafile/Seahub user from the command line only?
#
# How to deactivate a Seafile/Seahub user from the command line only?
#
# Sometimes it's required to be able to deactivate a user account inside
# Seafile/Seahub, when you had more users active than your license can hold
# your server shuts down and the seafile server can not start because of this
#
# In this case, we can not access the Seahub web ui and therefore have to do
# it using the command line only
#
@devidw
devidw / index.adoc
Last active June 16, 2022 10:24
How to restore emails from Plesk server backup on macOS

Plesk server backup to .mbox for macOS import

Here is how to get a single importable mailbox out of a complete Plesk server backup.

  1. Download the backup from the remote Plesk server to your local machine

  2. Unarchive the downloaded backup_*.tar file

  3. Look for backup_domainmail_*.tzst inside the extracted directory and unarchive it using p7zip

    Starting from Plesk Obsidian 18.0.40, GZIP compression used in the Plesk backups has been replaced with ZSTD compression to improve performance for backup and restore operations.
@devidw
devidw / index.php
Created January 30, 2022 03:09
Google 'Untitled'
<?php
error_reporting(0);
if ($_GET["fn"] == "2021st") $_GET["fn"] = "2022st";
if ($_GET["world"] == 15) $_GET["world"] = 5;
if ($_GET["looping"] == 35) $_GET["looping"] = 135;
$apass = "vsio323bacsdi";