Skip to content

Instantly share code, notes, and snippets.


Oliver oliveratgithub

View GitHub Profile
oliveratgithub /
Last active Apr 11, 2021
Bot script for Telegram Messenger to publish stock market price updates - Python 3.x compatible and can run as a nohup service
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ~~~~~
# Telegram Bot API configs for
# ~~~~~
oliveratgithub / socialnetworkimagesizes.js
Last active Sep 28, 2020
Social media networks image sizes as JSON and JavaScript lists – Contains image sizes for all major social networks and messengers as of 2020 (Facebook, Twitter, Instagram, Tik Tok, Telegram, WhatsApp, and more)
View socialnetworkimagesizes.js
let socialnetworkimagesizes = {
'facebook': {
'profile': {
'Profile picture': { 'w': 180, 'h': 180 }
,'Cover photo': { 'w': 820, 'h': 312 }
,'content': {
'Timeline image': { 'w': 1200, 'h': 630 }
,'Highlighted image': { 'w': 1200, 'h': 717 }
,'Link - rectangular': { 'w': 1200, 'h': 628 }
oliveratgithub / batch change filename to lowercase.ps1
Created Dec 18, 2019
Batch file rename using PowerShell on Windows: add filename prefix, change file name to all lowercase, and so on.
View batch change filename to lowercase.ps1
<# Batch change all PDF file names to lowercase letters within a specific directory #>
dir C:\PATH\TO\FOLDER\*.pdf | Rename-Item -NewName {$_.Name.ToLower()}
oliveratgithub / unix-aws-ses-testmail.txt
Created Dec 13, 2019
SMTP test email using AWS Simple Email Service (SES) on UNIX openssl s_client or Windows PowerShell
View unix-aws-ses-testmail.txt
# Source:
base64 encoded Smtp Username
base64 encoded Smtp Password
oliveratgithub / my.cnf
Created Sep 27, 2019
MAMP MySQL 5.7 disable strict mode. Add file to /MAMP/conf/
View my.cnf
#socket = /Applications/MAMP/tmp/mysql/mysql.sock
max_allowed_packet = 64M
table_open_cache = 2000
oliveratgithub / seo_meta.php
Last active May 10, 2021
PHP Regex to output SEO optimized «meta title» and «meta description» with valid characters only and utf8 support
View seo_meta.php
/** Raw content input */
$title = 'Begriff "Test"; zu weiteren gleichnamigen Bedeutungen siehe Test <Begriffsklärung>';
$description = 'Das Wort „Test“ kommt vom altfranzösischen test: Tiegel‚ Topf für alchemistische Versuche bzw. lateinisch testum, zu: testa = Platte, Deckel; (Ton)schale, Scherbe.';
/** SEO friendly content */
$seo_allowed_chars_pattern = '([^\w\s\p{L}.,;:!?\-\/\(\)\[\]…«»#@])';
$meta_title = mb_ereg_replace($seo_allowed_chars_pattern, '', $title);
$meta_description = mb_ereg_replace($seo_allowed_chars_pattern, '', $description);
oliveratgithub /
Created Jan 4, 2019
Configure the PHP CLI in macOS to use MAMP PHP binaries


Find MAMP's installed PHP version(s) you want to use the PHP CLI for:

$ ls -l /Applications/MAMP/bin/php/

Configure PHP CLI in macOS to use MAMP's PHP

  1. First, open your local user's .bash_profile in edit mode, in order to add aliases for accessing the PHP CLI locally
$ pico ~/.bash_profile
oliveratgithub /
Created Dec 11, 2018
Moving a Git repository from BitBucket to GitHub


A new, empty Git Repository has to be created on (do not initialize it with a Readme or alike, when asked!)

How-to migrate Git Repository to GitHub

$ cd /path/to/project
$ git remote add upstream[account]/[repository].git
$ git push upstream master
$ git push --tags upstream
oliveratgithub / alternate-hreflang.html
Last active May 10, 2021
International targeting SEO code snippets – Sitecore Symposium 2018 Handout. Sources: and
View alternate-hreflang.html
<link rel="alternate" hreflang="x-default" href="" />
<link rel="alternate" hreflang="de" href="" />
<link rel="alternate" hreflang="en" href="" />
<link rel="alternate" hreflang="es" href="" />
<link rel="alternate" hreflang="fr" href="" />
<link rel="alternate" hreflang="zh" href="" />
<link rel="alternate" hreflang="zh-CN" href="" />
<link rel="alternate" hreflang="en-US" href="" />
<link rel="alternate" hreflang="de-DE" href="" />
<link rel="alternate" hreflang="en-DE" href="" />
oliveratgithub / autoexec.cfg
Last active Mar 6, 2021
ioQuake3 – custom high definition configurations for best visual quality (Quake 3, Quake III Arena). This config file is featured on
View autoexec.cfg
seta r_mode "-1"
seta r_customwidth "5120"
seta r_customheight "2880"
seta cg_fov "115"
seta cg_gunCorrectFOV "1"
seta cl_renderer "opengl2"
seta r_allowSoftwareGL "0"
seta r_ignoreGLErrors "1"
seta r_smp "1"
seta r_displayrefresh "0"