This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDictionary *aDictionary = nil; | |
NSArray *anArray = nil; | |
void (^aBlock)() = ^{ }; | |
// no warning | |
aDictionary = aBlock; | |
// no warning | |
anArray = aBlock; | |
// warning assigning NSArray to NSDictionary, but not for block assignment | |
aDictionary = anArray = aBlock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Calendar" | |
-- delete everything from the destination calendar | |
-- TODO: Change "Destination Calendar" to be the name of your destination calendar | |
repeat with anEvent in (get events of calendar "Destination Calendar") | |
delete anEvent | |
end repeat | |
-- copy all events from the source calendar to the destination | |
-- TODO: Change "Source Calendar" to be the name of your source calendar | |
-- TODO: Change "Destination Calendar" to be the name of your destination calendar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import subprocess | |
import sys | |
EDITOR = 'vim' | |
BINARY = 'Apple binary property list' | |
XML = 'XML document text' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Idea taken from: | |
# http://community.skype.com/t5/Mac/Re-Pause-option-when-dialing/td-p/731820 | |
import argparse | |
import codecs | |
import re | |
import subprocess | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set interpreter to /bin/bash | |
case "{query}" in | |
"monday") code="12345#,,#" ;; | |
"wednesday") code="23456#,,#" ;; | |
"friday") code="34567#,,#" ;; | |
*) code="{query}#,,#" ;; | |
esac | |
$HOME/bin/skypecall "800-555-1212" "$code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import codecs | |
import glob | |
import os | |
import plistlib | |
import re | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.paulcalnan.pbcopy</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/pbcopy</string> | |
</array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set appleID to "ENTER YOUR APPLE ID HERE" | |
activate application "Xcode" | |
tell application "System Events" | |
tell process "Xcode" | |
-- open the preferences dialog | |
click menu item "Preferences…" of menu "Xcode" of menu bar 1 | |
-- find and select the Accounts tab |
OlderNewer