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 "Finder" to set theSel to selection as alias list | |
set pathList to {} | |
repeat with anItem in theSel | |
set the end of pathList to quoted form of (POSIX path of (anItem as alias)) | |
end repeat | |
set savedDelimiters to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to " " | |
set the clipboard to pathList as string | |
set AppleScript's text item delimiters to savedDelimiters |
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 "Finder" to set theSel to selection as alias list | |
set pathList to {} | |
repeat with anItem in theSel | |
set the end of pathList to quoted form of (POSIX path of (anItem as alias)) | |
end repeat | |
set savedDelimiters to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to " " | |
set myoutput to pathList as string | |
set AppleScript's text item delimiters to savedDelimiters | |
return myoutput |
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 "Finder" to get quoted form of POSIX path of (target of front Finder window as 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
#!/bin/bash | |
# get rid of duplicate apps by reindexing | |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -r -domain local -domain system -domain user | |
# reindex mail | |
rm $HOME"/Library/Mail/v2/MailData/Envelope Index" | |
rm $HOME"/Library/Mail/v2/MailData/Envelope Index-shm" | |
rm $HOME"/Library/Mail/v2/MailData/Envelope Index-wal" |
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 | |
## opennyt.py | |
## | |
## Given a NYT article on the front page this reopens it without the paywall | |
import sys, os | |
import time, string, re | |
import urllib, json |
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 | |
# -*- coding: utf-8 -*- | |
## comingevents.py | |
################################################### | |
# Lists in a nice format forthcoming events | |
from appscript import * | |
import osax |
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
import Foundation | |
extension Array { | |
func get (range: Range<Int>) -> Array<T> { | |
var subarray = Array<T>() | |
for var i = range.startIndex; i < range.endIndex; i++ { | |
subarray += [self[i]] | |
} |