2017-10-12

Python - Replace three consecutive dot-space strings (. . . ) with triple dot (...)

import re
str = "This is one  . . .  . . This is two. And other."
print re.sub( r'((\. )\2{2,2})', '...', str)

2017-10-10

MacOS - How to verify a file's sha256 checksum

Terminal command:
openssl dgst -sha256 /PATH/FILE_NAME

Yields:
SHA256(/PATH/FILE_NAME)= 77aa9930be611ec3f4e72d74c897dac5a98b4e61884a4048d31e4597f9fbb9ff


2017-10-09

MySQL - GROUP_CONCAT Character Limit Setting

Run this session variable before your SQL.
Adjust the number of characters.

SET SESSION group_concat_max_len = 5000;