Skip to content

Instantly share code, notes, and snippets.

View oliveratgithub's full-sized avatar

Oliver oliveratgithub

View GitHub Profile
@oliveratgithub
oliveratgithub / mamp-sql-dump-export.sh
Created January 6, 2017 20:42
MAMP MySQL dump export using Terminal.app in macOS
$ cd /Applications/MAMP/Library/bin/
$ ./mysqldump --host=localhost -uroot -proot source_database > ~/Desktop/database_name-dump.sql
@oliveratgithub
oliveratgithub / mamp-sql-dump-import.sh
Last active April 24, 2019 09:51
MAMP MySQL dump import using Terminal.app in macOS
$ cd /Applications/MAMP/Library/bin/
$ ./mysql --host=localhost -uroot -proot target_database < ~/Desktop/database_name-dump.sql
@oliveratgithub
oliveratgithub / curl-crawler.sh
Last active November 23, 2023 01:49
Unix Shell-Script to crawl a list of website URLs using curl
#!/bin/sh
timezone="Europe/Zurich"
# List of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones
script="${0##*/}"
rootdir=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
logfile="$script.log"
log="$rootdir/$logfile"
now=$(TZ=":$timezone" date)
# Uncomment 'mailto=' (remove #) to enable emailing the log upon completion
#mailto="your@email.com"
@oliveratgithub
oliveratgithub / MailMergeSaveEachRecordToFile.vba
Created May 9, 2017 20:31
VBA macro for Microsoft Word (Mac + Windows) to Mail Merge each record into separate documents. Execute the following VBA Macro on your Office Word Mail Merge template to have Word generate & save every record into a single file. More information: https://swissmacuser.ch/microsoft-word-mail-merge-into-single-documents/
'More information & instructions:
'https://swissmacuser.ch/microsoft-word-mail-merge-into-single-documents/
Option Explicit
Sub MailMergeSaveEachRecordToFile()
'
' Save each single Mail Merge Record into a seperate Document
'
Dim rec, lastRecord As Integer
Dim docNameField, strDocName, savePath As String
@oliveratgithub
oliveratgithub / curl_url_check.sh
Last active February 7, 2023 06:08
Simple one-liner curl command for macOS/Unix bash terminal to repeatedly check a specific url
# Remark: list of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones
clear; while [ : ]; do curl -sSL -w '%{http_code} %{url_effective} ' "https://github.com" -o /dev/null; echo $(TZ=":Europe/Zurich" date); sleep 5; done
@oliveratgithub
oliveratgithub / LNGoogleCalSync-Launcher.applescript
Created May 28, 2017 21:20
AppleScript to launch the "Lotus Notes to Google Calendar Synchronizer"-GUI (LNGoogleCalSync) in the background on macOS
---- This AppleScript is written to work with the Lotus Notes to Google Calendar Synchronizer on macOS
---- http://lngooglecalsync.sourceforge.net
---- AppleScript by oliveratgithub
-- Change below path to match the location of the "lngsync.sh" file!
property lngsyncPath : "/Applications/LNGoogleCalSync/"
---- You don't need to care about the code below this line ;-)
property lngsyncFilePath : lngsyncPath & "lngsync.sh"
@oliveratgithub
oliveratgithub / emojis.json
Last active April 19, 2024 05:47
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z
@oliveratgithub
oliveratgithub / New Movies.m3u
Created May 2, 2018 20:51
Example .m3u-Playlist for playing content on WD TV and WD TV Live multimedia hub
#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 / autoexec.cfg
Last active September 11, 2021 09:23
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/
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 / alternate-hreflang.html
Last active May 10, 2021 20:57
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
<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" />