Skip to content

Instantly share code, notes, and snippets.

oliveratgithub / Apple_find_city.asp.xml
Last active Sep 21, 2015
Example call to from Apple's Weather Dashboard Widget in OS X Yosemite,
View Apple_find_city.asp.xml
<adc_Database xmlns="">
<CityList us="4" intl="3" extra_cities="0">
<location city="Zurich" state="KS" postal="lid_2137121"/>
<location city="Zurich" state="NY" postal="lid_2171451"/>
<location city="Zurich" state="MT" postal="lid_349249"/>
<location city="Zurich" state="CA" postal="lid_2143185"/>
oliveratgithub / class.mythemenamethemehooks.php
Last active Oct 5, 2015
Vanilla Community Forum custom Theme hook to add custom apple-touch-icons and favicon to your site
View class.mythemenamethemehooks.php
<?php if (!defined('APPLICATION')) exit();
class MythemenameThemeHooks implements Gdn_IPlugin
* No setup required
public function Setup() { }
oliveratgithub / Add Reminder to Wunderlist.scpt
Last active Nov 13, 2015
AppleScript to add a Text selection as a new Reminder to Wunderlist
View Add Reminder to Wunderlist.scpt
on run {input, parameters}
-- This code comes from
-- To be used with an Automator Service
-- ------------------------------------------------
tell application "System Events"
keystroke "c" using {command down}
end tell
set inputText to the clipboard as Unicode text
oliveratgithub /
Last active Jun 8, 2017
Simple one-liner curl command for macOS/Unix bash terminal to repeatedly check a specific url
# Remark: list of valid timezones:
clear; while [ : ]; do curl -sSL -w '%{http_code} %{url_effective} ' "" -o /dev/null; echo $(TZ=":Europe/Zurich" date); sleep 5; done
oliveratgithub /
Created Nov 5, 2015
Automatic Dynamics DNS updater using HTTP API calls, prepared for / (works with any other DDNS Service, allowing IP updates via HTTP API calls)
my_ext_ip=$(curl -sS
echo "\n\n\n===== \
\n$(date -u) \
\nUpdating IP to: $my_ext_ip \n" >> $log
curl -isSX PUT \
-u "mail@host.tld:api_token" \
-H "Content-Type: application/json" \
--data '{"ip_address":"'$my_ext_ip'", "activate_wildcard": "false"}' \
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
#EXTINF:180,Surftrip to Spain 2018
Movies/Holidays/Surfing/Surfing Spain 2018.mp4
#EXTINF:180,Documentary about Whales
#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 /
Created Jan 6, 2017
MAMP MySQL dump export using in macOS
$ cd /Applications/MAMP/Library/bin/
$ ./mysqldump --host=localhost -uroot -proot source_database > ~/Desktop/database_name-dump.sql
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 / Add as new Reminder.scpt
Last active Feb 21, 2019
Add selected Text as new Reminder in
View Add as new Reminder.scpt
on run {input, parameters}
-- This code comes from
-- To be used with an Automator Service
-- ------------------------------------------------
set inputText to input as string
tell application "Reminders"
set newremin to make new reminder
set name of newremin to inputText
end tell
oliveratgithub /
Last active Apr 24, 2019
MAMP MySQL dump import using in macOS
$ cd /Applications/MAMP/Library/bin/
$ ./mysql --host=localhost -uroot -proot target_database < ~/Desktop/database_name-dump.sql