Skip to content

Instantly share code, notes, and snippets.

# Why no PHP8.2 + QT6.6?
# Prior Work
[PHP8 + QT5](https://github.com/nazmulpcc/phpqt)
* proof of concept; last commit Jun 17, 2023
[PHP7 + QT5](https://phpqt.ru/)
* part of PQEngine and PlastiQ; last commit Jan 28, 2019
[PHP7 + QT5](https://github.com/abiusx/phpqt-ng)
```
Disable auto-renewal
There went something wrong to disable your auto-renewal for Unlimited: The subscription could not be updated, something went wrong: Recurly_Error: A canceled subscription can't transition to canceled in /var/www/vendor/recurly/recurly-client/lib/recurly/util/http_validations.php:19 Stack trace: #0 /var/www/vendor/recurly/recurly-client/lib/recurly/response.php(63): Recurly_ClientResponse->validateStatusCode(400, Object(Recurly_FieldError)) #1 /var/www/vendor/recurly/recurly-client/lib/recurly/resource.php(94): Recurly_ClientResponse->assertValidResponse() #2 /var/www/vendor/recurly/recurly-client/lib/recurly/subscription.php(111): Recurly_Resource->_save('PUT', 'https://moovly....') #3 /var/www/src/Moovly/LicenseBundle/Service/RecurlyService.php(606)
@robocoder
robocoder / gist:fc9a28fd1500d510d197a4209996d0f3
Last active June 11, 2020 14:04
Purple Player, Platform Purple, DRM, Leaping Brain, Brain Trust
Audience: video content creators
It is alleged that:
* the initial DRM implementation simply XOR'd the first 13 bytes of the first 15 x 1K blocks of the video file;
* the 13 byte key was literally, "RANDOM STRING"
* reference: https://plus.google.com/+AsherLangton/posts/Yk71MgkvAXx
It was later observed that:
* the DRM implementation was changed to XOR the first 32 bytes of the first 16 x 1K blocks of the video file;
* the 32 byte key appears random;
@robocoder
robocoder / gist:33afa327be2838e83b13d6ddbc996c29
Created May 9, 2018 18:16
PHP build_url (opposite of parse_url)
/**
* Generate URL from its components (i.e., opposite of built-in php function, parse_url())
*
* @param array $components
*
* @return string
*/
function build_url($components)
{
$url = $components['scheme'] . '://';
@robocoder
robocoder / gist:f4e735e5c20881ed53e21a32daadf2cb
Created February 20, 2018 20:04
building apt on xenial
# apt 1.4.y
git clone https://github.com/Debian/apt.git
cd apt
git checkout 1.4.y
apt-get install libcurl4-openssl-dev
apt-get install cmake
apt-get install liblz4-dev
apt-get install liblzma-dev
apt-get install libbzip2-dev
apt-get install libbz2-dev
@robocoder
robocoder / decode.php
Last active December 2, 2023 04:25
PHP Decoding MySQL's .mylogin.cnf
<?php // tested with PHP 8.0.11
$start = microtime(true);
const LOGIN_KEY_LEN = 20;
const MY_LOGIN_HEADER_LEN = 24;
const MAX_CIPHER_STORE_LEN = 4;
$raw = file_get_contents(__DIR__ . '/mylogin.cnf');
$fp = 4; // skip null bytes
@robocoder
robocoder / mb_overrides.rst
Created February 6, 2012 00:42
mbstring.func_overload

When mbstring.func_overload is enabled, various (but not all) built-in string functions are overridden by mbstring's multi-byte string functions.

  • "mail", "mb_send_mail", "mb_orig_mail"
  • "strlen", "mb_strlen", "mb_orig_strlen"
  • "strpos", "mb_strpos", "mb_orig_strpos"
  • "strrpos", "mb_strrpos", "mb_orig_strrpos"
  • "stripos", "mb_stripos", "mb_orig_stripos"
  • "strripos", "mb_strripos", "mb_orig_strripos"
  • "strstr", "mb_strstr", "mb_orig_strstr"
  • "strrchr", "mb_strrchr", "mb_orig_strrchr"