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
package net.kristopherjohnson.util; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.Locale; | |
import java.util.TimeZone; | |
/** | |
* Methods for dealing with timestamps |
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
-- Adapted from these sources: | |
-- http://peterdowns.com/posts/open-iterm-finder-service.html | |
-- https://gist.github.com/cowboy/905546 | |
-- https://gist.github.com/eric-hu/5846890 | |
-- Modified to work with files as well, cd-ing to their container folder | |
-- Modified to do an ls -l if the selected item in Finder is a file so that you get the name of the file waiting for you in the terminal. | |
on run {input, parameters} | |
tell application "Finder" | |
set my_file to first item of input |