Skip to content

Instantly share code, notes, and snippets.

View kristos80's full-sized avatar
πŸ’­
It's not a bug, it's a feature!

Christos Athanasiadis kristos80

πŸ’­
It's not a bug, it's a feature!
View GitHub Profile
{
"message": "<p><strong>Thank You for Using SORT! πŸŽ‰</strong> We appreciate you choosing SORT to optimize your WooCommerce store! πŸš€ Stay tuned: exciting updates, tips, and new features will be announced here to help you make the most of your store's potential. πŸ’‘ Need help or have feedback? <a href='#' target='_blank'>Click here to reach out!</a></p>"
}
@kristos80
kristos80 / mask-string.php
Last active November 23, 2023 13:01
Generic utility method in PHP to mask a string with a specific character. Can be used for password masking eg
<?php
/**
* Generic utility method to mask a string with a specific character
*
* @param string $stringToMask The string to be masked
* @param int $percentageOfCharactersToShow What percentage of characters to show. Default = 20%
* @param string $maskCharacter With which character to mask. Default = '*'. If more characters are used, only the first will be used as mask
* @param bool $maskFromStart From which direction to start masking. TRUE = From start, FALSE = From the end
* @return string
*/
@kristos80
kristos80 / quine.php
Last active April 8, 2021 14:52
Implementation of a quine program in PHP
<?=file_get_contents(__FILE__)?>