Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@gglnx
gglnx / containsMb4.php
Created December 20, 2019 12:49
containsMb4
<?php
// Download the bible from here: https://bereanbible.com/bsb.txt
ini_set('memory_limit', -1);
require_once 'helpers.php';
echo('Start: ' . convert(memory_get_usage()) . "\r\n");
@gglnx
gglnx / message.txt
Created May 7, 2020 14:10
keys.pub proof
BEGIN MESSAGE.
aWtS9WGb8Nk0LNE i56ErQgPAtWkguw jClbULwAVbrHrRx S8J22xvsechjeKx
I9TzjcSUSNimV0s z3KWftQkgqvTCKq 6Xr2MZHgg4hCBQs TV4hQacnRRlsKUy
JNEASUA2pQBgglN bLadRI41kOzcOUk YSMtUKH8DfO1Zj0 TVI9mtgO3XRDFSM
2M4HieA9Bxkc9X3 Pmq9pETMl4ABhQU HWlIL.
END MESSAGE.
@gglnx
gglnx / LinkField.php
Created January 4, 2021 16:14
Add simple support for Link Field by Sebiastan Lenz to Feed Me
<?php
use Cake\Utility\Hash;
use craft\feedme\base\Field;
use craft\feedme\base\FieldInterface;
use craft\feedme\helpers\DataHelper;
/**
* Adds support for Link field by Sebastian Lenz to Feedme
*/
@gglnx
gglnx / README.md
Created February 12, 2021 22:30
Download all data request files from Amazon

Open the Privacy Central Data Request page.

Run this in your console

(await Promise.all(
    Array.from(document.querySelectorAll('[data-action="get-document-link-and-download"]'))
        .map(async ($el) => {
            const data = JSON.parse($el.dataset.getDocumentLinkAndDownload);
            const requestData = {
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Berlin, 2021-03-17
OpenPGP Key Transition Statement
I have created a new OpenPGP key and will be transitioning away from
my old key. The old key has not been compromised and will continue to
be valid for some time, but I prefer all future correspondence to be
<?php
/**
* @link http://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license http://craftcms.com/license
*/
namespace craft\behaviors;
use yii\base\Behavior;
@gglnx
gglnx / GermanState.php
Created November 11, 2022 12:04
Field with enum as value type
<?php
/**
* German state
*/
enum GermanState: string
{
case BW = 'Baden-Württemberg';
case BY = 'Bayern';
case BE = 'Berlin';