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/osascript | |
on run arguments | |
tell application "Finder" | |
-- no argument: get frontmost window or desktop | |
if (count of arguments) is 0 then | |
if (count of windows) is 0 then | |
set dir to (desktop as alias) | |
else | |
set dir to ((target of Finder window 1) as alias) |
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 | |
from __future__ import division, print_function | |
from math import atan, pi, tan | |
# Spit out some mappings for the slant axis to get closer to actual degrees. | |
#print(angle, | |
# atan( | |
# tan(slant * pi / 180) / (slant / angle) |