Skip to content

Instantly share code, notes, and snippets.

View martinellimarco's full-sized avatar

Marco Martinelli martinellimarco

View GitHub Profile
@martinellimarco
martinellimarco / macromedia-director-patch-for-zero-zone.sh
Created November 24, 2025 14:02
Patch for the Macromedia Director runtime used by ZeroZone and other games so it can run on systems with > 2 GiB of RAM.
#!/bin/bash
# Patch for the Macromedia Director runtime used by ZeroZone so it can run on systems with > 2 GiB of RAM.
#
# This patch has been confirmed to work with:
# - The Italian version of ZeroZone, where the runtime is located at ./ZZnet/ZZnet.exe
# - The English version of ZeroZone, where the runtime is located at ./GalaxyNet.exe
#
# The same patch may also apply to other games built with the same Macromedia Director runtime.
# There are several version of the runtime, see https://wiki.scummvm.org/index.php?title=Director/Versions
# This patch only applies to versions equal or similar to the one used in ZeroZone.
@martinellimarco
martinellimarco / skype-message-remover.py
Last active March 8, 2025 18:55
Script to remove all your messages from all chats in Skype
from skpy import Skype, SkypeSingleChat, SkypeGroupChat
import time
import getpass
import argparse
import sys
def delete_all_messages(username, password, skip_confirmation=False):
try:
# Login to Skype
print("Logging in to Skype...")
@martinellimarco
martinellimarco / FilteringCPT.patch
Created December 16, 2023 13:59
FIX: WP All Export - slow export when using OR filters on postmeta (custom fields)
--- src/Pro/Filtering/FilteringCPT.php 2023-12-16 13:44:38.817294704 +0000
+++ src/Pro/Filtering/FilteringCPT.php 2023-12-16 13:44:19.792826943 +0000
@@ -211,8 +211,8 @@
self::$variationWhere = $this->queryWhere;
}
- $joinString = " INNER JOIN {$this->wpdb->postmeta} AS $table_alias ON ({$this->wpdb->posts}.ID = $table_alias.post_id) ";
- $whereString = "$table_alias.meta_key = '$meta_key' AND $table_alias.meta_value " . $this->parse_condition($rule, false, $table_alias);
+ $joinString = " INNER JOIN {$this->wpdb->postmeta} AS $table_alias ON ({$this->wpdb->posts}.ID = $table_alias.post_id AND $table_alias.meta_key = '$meta_key') ";
+ $whereString = "$table_alias.meta_value " . $this->parse_condition($rule, false, $table_alias);