Skip to content

Instantly share code, notes, and snippets.

View oliveratgithub's full-sized avatar

Oliver oliveratgithub

View GitHub Profile
@oliveratgithub
oliveratgithub / Apple_find_city.asp.xml
Last active September 21, 2015 23:12
Example call to accuweather.com from Apple's Weather Dashboard Widget in OS X Yosemite, http://apple.accuweather.com/adcbin/apple/Apple_find_city.asp?location=Zurich
<adc_Database xmlns="http://www.accuweather.com">
<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
oliveratgithub / class.mythemenamethemehooks.php
Last active October 5, 2015 13:31
Vanilla Community Forum custom Theme hook to add custom apple-touch-icons and favicon to your site
<?php if (!defined('APPLICATION')) exit();
class MythemenameThemeHooks implements Gdn_IPlugin
{
/**
* No setup required
*/
public function Setup() { }
/**
@oliveratgithub
oliveratgithub / Add Reminder to Wunderlist.scpt
Last active November 13, 2015 16:37
AppleScript to add a Text selection as a new Reminder to Wunderlist
on run {input, parameters}
-- This code comes from http://raduner.ch/blog/
-- 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
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 / readme.md
Created December 11, 2018 10:20
Moving a Git repository from BitBucket to GitHub

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 / Add as new Reminder.scpt
Last active February 21, 2019 10:23
Add selected Text as new Reminder in Reminders.app
on run {input, parameters}
-- This code comes from http://raduner.ch/blog/
-- 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
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 / 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 / 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 / my.cnf
Created September 27, 2019 21:23
MAMP MySQL 5.7 disable strict mode. Add file to /MAMP/conf/
[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