Skip to content

Instantly share code, notes, and snippets.

Oliver oliveratgithub

Block or report user

Report or block oliveratgithub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oliveratgithub
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
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: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp-client-command-line.html
# X-SES-CONFIGURATION-SET is optional
EHLO yourdomain.com
AUTH LOGIN
base64 encoded Smtp Username
base64 encoded Smtp Password
MAIL FROM: from@yourdomain.com
RCPT TO: email@anydomain.com
DATA
#X-SES-CONFIGURATION-SET: YourSESConfigSet
@oliveratgithub
oliveratgithub / my.cnf
Created Sep 27, 2019
MAMP MySQL 5.7 disable strict mode. Add file to /MAMP/conf/
View my.cnf
[client]
#socket = /Applications/MAMP/tmp/mysql/mysql.sock
[mysqld]
max_allowed_packet = 64M
table_open_cache = 2000
sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
@oliveratgithub
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
<?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
oliveratgithub / readme.md
Created Jan 4, 2019
Configure the PHP CLI in macOS to use MAMP PHP binaries
View readme.md

Pre-requisites

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
oliveratgithub / readme.md
Created Dec 11, 2018
Moving a Git repository from BitBucket to GitHub
View readme.md

Pre-requisites

A new, empty Git Repository has to be created on GitHub.com (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 https://github.com/[account]/[repository].git
$ git push upstream master
$ git push --tags upstream
@oliveratgithub
oliveratgithub / alternate-hreflang.html
Last active Jul 19, 2019
International targeting SEO code snippets – Sitecore Symposium 2018 Handout. Sources: https://www.sitemaps.org/protocol.html and https://support.google.com/webmasters/answer/189077?hl=en
View alternate-hreflang.html
<link rel="alternate" hreflang="x-default" href="https://www.mysite.com/" />
<link rel="alternate" hreflang="de" href="https://www.mysite.com/de-de" />
<link rel="alternate" hreflang="en" href="https://www.mysite.com/en-de" />
<link rel="alternate" hreflang="es" href="https://www.mysite.com/es-es" />
<link rel="alternate" hreflang="fr" href="https://www.mysite.com/fr-fr" />
<link rel="alternate" hreflang="zh" href="https://www.mysite.com/zh-cn" />
<link rel="alternate" hreflang="zh-CN" href="https://www.mysite.com/zh-cn" />
<link rel="alternate" hreflang="en-US" href="https://www.mysite.com/en-us" />
<link rel="alternate" hreflang="de-DE" href="https://www.mysite.com/de-de" />
<link rel="alternate" hreflang="en-DE" href="https://www.mysite.com/en-de" />
@oliveratgithub
oliveratgithub / autoexec.cfg
Last active Nov 27, 2019
ioQuake3 – custom high definition configurations for best visual quality (Quake 3, Quake III Arena). This config file is featured on https://swissmacuser.ch/how-you-want-to-run-quake-iii-arena-in-2018-with-high-definition-graphics-120-fps-on-5k-resolution/
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"
@oliveratgithub
oliveratgithub / New Movies.m3u
Created May 2, 2018
Example .m3u-Playlist for playing content on WD TV and WD TV Live multimedia hub
View New Movies.m3u
#EXTM3U
#EXTINF:180,Surftrip to Spain 2018
Movies/Holidays/Surfing/Surfing Spain 2018.mp4
#EXTINF:180,Documentary about Whales
Documentary/Animals/whales_docu.avi
#EXTINF:180,Downhill in the mountains last week (GoPro)
Movies/Biking/Mountain Downhill Action (GoPro 4k).mp4
#EXTINF:180,School play summer 2015
Movies/Kids/School play at middleschool - June 2015.avi
@oliveratgithub
oliveratgithub / emojis.json
Last active Jan 20, 2020
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
View emojis.json
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👦", "name": "family_children", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👦‍👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "&#128104;&zw
You can’t perform that action at this time.