Skip to content

Instantly share code, notes, and snippets.

Avatar

William Smith talkingmoose

View GitHub Profile
@talkingmoose
talkingmoose / Add contact birthdays to calendars.scpt
Created Sep 11, 2011
Add Outlook for Mac contact birthdays to calendar
View Add contact birthdays to calendars.scpt
tell application "Microsoft Outlook"
set contactList to every contact
set theYear to text returned of (display dialog "Enter the calendar year for new birthday reminders." default answer year of (current date) with title "Which year?" with icon 1)
if theYear as integer 1904 or theYear as integer 2039 then
display dialog "You must specify a year between 1904 and 2039." with icon stop with title "Error!" buttons {"Cancel"}
end if
repeat with aContact in contactList
@talkingmoose
talkingmoose / pvt.talkingmoose.LaunchTextEdit.plist
Created Sep 14, 2011
Example: How to launch a GUI application using launchd
View pvt.talkingmoose.LaunchTextEdit.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>pvt.talkingmoose.LaunchTextEdit</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>-a</string>
@talkingmoose
talkingmoose / deleteOutlookMessages.scpt
Created Nov 6, 2011
Permanently delete Outlook for Mac messages
View deleteOutlookMessages.scpt
tell application "Microsoft Outlook"
set theMessages to the selection
permanently delete theMessages
end tell
@talkingmoose
talkingmoose / dittoPayloadToUsers.sh
Created Feb 20, 2012
Shell script to ditto Apple package payload to user home folders and user template
View dittoPayloadToUsers.sh
#!/bin/sh
## postflight
copyPayloadToAllUsers() {
# Enter a path to a logfile.
LOGFILE="/path/to/file.log"
# Copy the payload file(s) to all existing user folders.
@talkingmoose
talkingmoose / CommunicatorSetup-1.0.sh
Created Mar 7, 2012
Shell script to configure Microsoft Communicator user name and email address
View CommunicatorSetup-1.0.sh
#!/bin/sh
########################### About this script ##########################
# #
# Purpose: Populates user name and email address settings #
# for Communicator 2011 for Mac. This script resides #
# in /Library/talkingmoose/Scripts and is launched #
# by launch agent net.talkingmoose.CommunicatorSetup.plist. #
# #
# Created by William Smith #
@talkingmoose
talkingmoose / net.talkingmoose.CommunicatorSetup.plist
Created Mar 8, 2012
Launch agent for CommunicatorSetup-1.0.sh script
View net.talkingmoose.CommunicatorSetup.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.talkingmoose.CommunicatorSetup</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>/Library/talkingmoose/Scripts/CommunicatorSetup-1.0.sh</string>
@talkingmoose
talkingmoose / LyncSetup-1.0.sh
Created Mar 9, 2012
Shell script to configure Microsoft Lync user name and email address
View LyncSetup-1.0.sh
#!/bin/sh
########################### About this script ##########################
# #
# Purpose: Populates user name and email address settings #
# for Lync for Mac. This script resides #
# in /Library/talkingmoose/Scripts and is launched #
# by launch agent net.talkingmoose.LyncSetup.plist. #
# #
# Created by William Smith #
@talkingmoose
talkingmoose / net.talkingmoose.LyncSetup.plist
Created Mar 9, 2012
Launch agent for LyncSetup-1.0.sh script
View net.talkingmoose.LyncSetup.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.talkingmoose.LyncSetup</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>/Library/talkingmoose/Scripts/LyncSetup-1.0.sh</string>
@talkingmoose
talkingmoose / LyncSetup-1.2.sh
Created Mar 9, 2012
Shell script to configure Microsoft Lync user name and email address
View LyncSetup-1.2.sh
#!/bin/sh
########################### About this script ##########################
# #
# Purpose: Populates user name and email address settings #
# for Lync for Mac. This script resides #
# in /Library/talkingmoose/Scripts and is launched #
# by launch agent net.talkingmoose.LyncSetup.plist. #
# #
# Created by William Smith #
@talkingmoose
talkingmoose / net.talkingmoose.LyncSetup.plist
Created Mar 9, 2012
Launch agent for LyncSetup-1.2.sh script
View net.talkingmoose.LyncSetup.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.talkingmoose.LyncSetup</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>/Library/talkingmoose/Scripts/LyncSetup-1.2.sh</string>
You can’t perform that action at this time.