Skip to content

Instantly share code, notes, and snippets.

oliveratgithub / alternate-hreflang.html
Last active Jul 19, 2019
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 / LNGoogleCalSync-Launcher.applescript
Created May 28, 2017
AppleScript to launch the "Lotus Notes to Google Calendar Synchronizer"-GUI (LNGoogleCalSync) in the background on macOS
View LNGoogleCalSync-Launcher.applescript
---- This AppleScript is written to work with the Lotus Notes to Google Calendar Synchronizer on macOS
---- AppleScript by oliveratgithub
-- Change below path to match the location of the "" file!
property lngsyncPath : "/Applications/LNGoogleCalSync/"
---- You don't need to care about the code below this line ;-)
property lngsyncFilePath : lngsyncPath & ""
oliveratgithub / seo_meta.php
Last active Sep 2, 2019
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 / 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 / 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 / prettyearthimage.html
Last active May 12, 2020
Google Pretty Earth: Random Image Link Generator (HTML)
View prettyearthimage.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Google Pretty Earth - Random Image Link</title>
<body onload="printRandomPrettyearthLink()"><body>
var prettyearthImage = '';
var prettyearthBaseUrl = '';
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 /
Last active Nov 4, 2020
Unix Shell-Script to crawl a list of website URLs using curl
# List of valid timezones:
rootdir=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
now=$(TZ=":$timezone" date)
# Uncomment 'mailto=' (remove #) to enable emailing the log upon completion
oliveratgithub / index.html
Last active Dec 21, 2020
Simple, quick & standalone HTML5 responsive placeholder Website. Runs by simply copy-paste the whole code without any additional resource files. It's based on with jQuery containing a fullstretch-background image plugin and a date-time countdown; kudos to for beautiful placeholder images.
View index.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Dummy Page</title>
<meta name="description" content="Simple, quick, standalone responsive placeholder Website without any additional resources">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
<!--[if lt IE 9]>
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