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 | |
class Emoji | |
{ | |
const BOWTIE = ':bowtie:'; | |
const SMILE = ':smile:'; | |
const SIMPLE_SMILE = ':simple_smile:'; | |
const LAUGHING = ':laughing:'; | |
const BLUSH = ':blush:'; | |
const SMILEY = ':smiley:'; | |
const RELAXED = ':relaxed:'; |
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
A COLLECTION OF REDIS-CLI COMMANDS | |
PRODUCTION SAFE COMMANDS | |
Key pattern size sum | |
redis-cli -n ##DATABASE_ID## -p ##REDIS_PORT## --scan --pattern "*##PATTERN##*" | xargs -L 1 redis-cli -n ##DATABASE_ID## -p ##REDIS_PORT## --raw STRLEN | awk '{s+=$1} END {print s}' | |
Delete key pattern | |
redis-cli -n ##DATABASE_ID## -p ##REDIS_PORT## --scan --pattern "*##PATTERN##*" | xargs -L 10 redis-cli -n ##DATABASE_ID## -p ##REDIS_PORT## DEL | |
Delete big id-based HASH |
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
switch(json_last_error()) { | |
case JSON_ERROR_NONE: | |
echo ' - Sin errores'; | |
break; | |
case JSON_ERROR_DEPTH: | |
echo ' - Excedido tamaño máximo de la pila'; | |
break; | |
case JSON_ERROR_STATE_MISMATCH: | |
echo ' - Desbordamiento de buffer o los modos no coinciden'; | |
break; |