Skip to content

Instantly share code, notes, and snippets.

@verygoodplugins
verygoodplugins / wpf-allow-unsafe-crm-urls.php
Last active April 4, 2024 21:36
Bypass WordPress' unsafe URL check for CRM connection
<?php
/**
*
* This sometimes fixes the error "A valid URL was not provided." wen connecting to self
* hosted CRMs like Mautic, FluentCRM, or FunnelKit.
*
* @param array $args HTTP request arguments.
* @param string $url The request URL.
* @return array HTTP request arguments.
*/
@kerrickstaley
kerrickstaley / parse_serato_crates.py
Created March 22, 2019 17:02
Functions for parsing Serato DJ crates
import struct
def decode_struct(data):
ret = []
i = 0
while i < len(data):
tag = data[i:i+4].decode('ascii')
length = struct.unpack('>I', data[i+4:i+8])[0]
value = data[i+8:i+8+length]
value = decode(value, tag=tag)