Created
November 5, 2012 05:51
-
-
Save genehack/4015550 to your computer and use it in GitHub Desktop.
Applescript and shell code for Skotch.app
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
on check_file(filename) | |
tell application "Finder" | |
if exists filename then | |
return "yes" | |
else | |
return "no" | |
end if | |
end tell | |
end check_file | |
on open filelist | |
set home to system attribute "HOME" | |
set scriptname to home & "/.skotch" | |
set flag to check_file(POSIX file scriptname) | |
if flag is "no" then | |
display dialog "ERROR: File " & POSIX path of scriptname & " does not exist" | |
else | |
repeat with i in filelist | |
set filename to quoted form of POSIX path of i | |
set the clipboard to (do shell script scriptname & " " & filename) | |
end repeat | |
end if | |
end open |
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/sh | |
PATH=/opt/perl/bin:$PATH \ | |
NOPASTE_SSH_SERVER=genehack.org \ | |
NOPASTE_SSH_DOCROOT=/var/www/paste.genehack.org/ \ | |
NOPASTE_SSH_WEBPATH=http://paste.genehack.org \ | |
NOPASTE_SSH_MODE=0644 \ | |
/opt/perl/bin/nopaste -s ssh "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment