This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pega Hotfix Validator script. | |
# @author Alexandre Debusschère <alexandre.debusschere@hey.com> | |
# @see https://docs.pega.com/keeping-current-pega/86/manually-verifying-hotfix-files-using-third-party-tools | |
from sys import exit, argv | |
from os import path, chdir | |
from zipfile import ZipFile | |
from operator import itemgetter | |
from shutil import rmtree | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Pega Hotfix Validator script. | |
* | |
* With this little script you can manually validate a hotfix download from Pega MPS. | |
* It simply process the different steps described in the Pega documentation, see below. | |
* | |
* @author Alexandre Debusschère <alexandre.debusschere@hey.com> | |
* @see https://docs.pega.com/keeping-current-pega/86/manually-verifying-hotfix-files-using-third-party-tools | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CustomSessionStorage implementation with FaunaDb for your Node API Shopify app. | |
* | |
* On Fauna Dashboard, in my database, I created a Collection "Sessions" (with a TTL of 2 days, but configure it as you wish). | |
* I also added an Index "session_by_id" with Terms set as "data.id" and Serialized. | |
* | |
* In the constructor, replace my settings with yours to make the connection. | |
* If you have a different Collection and/or Index, then also update each method to use the correct configuration. | |
* | |
* @author Alexandre DEBUSSCHÈRE <alexandre@kosmonaft.dev> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Set references on parent products | |
UPDATE `ps_product` p | |
SET p.`reference` = REPLACE(REPLACE(LOWER(CONCAT_WS( | |
"_", | |
LEFT((SELECT CONVERT(`name` USING ascii) FROM `ps_product_lang` pl WHERE pl.`id_product` = p.`id_product` LIMIT 1), 10), | |
p.`id_product`, | |
"0" | |
)), "?", ""), " ", "") | |
WHERE p.`reference` IS NULL | |
OR p.`reference` = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_base64_encode($str) | |
{ | |
$base64 = str_split('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'); | |
$bit_pattern = ''; | |
$padding = 0; | |
$encoded = ''; | |
foreach (str_split($str) as $char) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of array_column function for PHP 5.3+, support for array of objects is also provided. | |
* | |
* @param array $input | |
* @param mixed $column_key | |
* @param mixed $index_key | |
* @return array | |
* @see http://php.net/manual/en/function.array-column.php |