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
(* | |
organize - hierarchy | |
This Folder Action handler is triggered whenever items are added to the attached folder. | |
The script organizes the added files into a folder hierarchy that follows the following structure: | |
YYYY/M/D | |
Where YYYY is four-digit year, M is month and D is the day. | |
Copyright 2010 Omar Abdel-Wahab <owahab@gmail.com>. | |
You may not incorporate this code into your program(s) without | |
a written permission from the author but you're free to use it AS IS |
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 "Safari" | |
if (count of every document) > 0 then | |
activate | |
do JavaScript "javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://www.tumblr.com/share',l=d.location,e=encodeURIComponent,p='?v=3&u='+e(l.href) +'&t='+e(d.title) +'&s='+e(s),u=f+p;try{if(!/^(.*\\.)?tumblr[^.]*$/.test(l.host))throw(0);tstbklt();}catch(z){a=function(){if(!w.open(u,'t','toolbar=0,resizable=0,status=1,width=450,height=430'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();}void(0)" in document 1 | |
end if | |
end tell |
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 wallpapers to selection | |
tell application "Image Events" | |
repeat with currentWallpaper in wallpapers | |
set theWallpaper to open (currentWallpaper as alias) | |
tell theWallpaper | |
repeat with dim in [{1920, 1080}, {1280, 800}] | |
-- Scale and Crop to current dimensions | |
scale to size (get item 1 of dim) | |
crop to dimensions dim |
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 "Terminal" | |
activate | |
tell application "System Events" to tell process "Terminal.app" to keystroke "t" using command down | |
do script "ssh jheppler@segonku.unl.edu" in the last tab of window 1 | |
tell application "System Events" to tell process "Terminal.app" to keystroke "t" using command down | |
do script "ssh jheppler@jetson.unl.edu" in the last tab of window 1 | |
tell application "System Events" to tell process "Terminal.app" to keystroke "t" using command down |
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 "Safari" | |
activate | |
open location "http://gist.github.com" | |
end tell | |
delay 1 | |
tell application "System Events" | |
tell process "Safari" | |
keystroke "v" using {command down} | |
end tell | |
end tell |
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 | |
-- Repeatedly pops a dialog box up in the finder. | |
tell application "Finder" | |
repeat | |
activate | |
display dialog "You can't make me go away!" with icon 2 buttons {"Oh Fuck"} default button 1 | |
end repeat | |
end tell |
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 wallpapers to selection | |
set myDimensions to {w169:[{2560, 1440}, {1920, 1080}, {1366, 768}], w1610:[{2560, 1600}, {1920, 1200}, {1440, 900}, {1280, 800}], f43:[{1600, 1200}], s:[{1024, 1024}]} | |
tell application "Image Events" | |
repeat with currentWallpaper in wallpapers | |
set theWallpaper to open (currentWallpaper as alias) | |
tell theWallpaper | |
set theWallpaperDimensions to dimensions of theWallpaper | |
set theWallpaperAspectRatio to (item 1 of theWallpaperDimensions) / (item 2 of theWallpaperDimensions) |
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
property theURL : "" | |
set clipSave to the clipboard | |
tell application "Reeder" | |
activate | |
end tell | |
tell application "System Events" | |
keystroke "c" using {shift down, command down} |
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
-- "Mal aux droits" droplet | |
on open the_files | |
repeat with f in the_files | |
set f to POSIX path of f | |
do shell script "sudo chmod -R a+rw " & quoted form of f with administrator privileges | |
end repeat | |
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
-- USER INPUT | |
set iPadWifiOr3G to button returned of (display dialog "Choose whether you're looking for a WiFi or a Wifi + 3G iPad." buttons {"WiFi", "WiFi+3G"}) | |
set iPadModel to iPadWifiOr3G | |
if iPadWifiOr3G contains "WiFi+3G" then | |
set iPadDataPlan to button returned of (display dialog "Select the carrier you'd like to use." buttons {"AT&T", "Verizon"}) | |
set iPadModel to iPadModel & " " & iPadDataPlan | |
end if | |
set iPadColor to button returned of (display dialog "Select the color of iPad you're looking for." buttons {"Black", "White"}) | |
set iPadModel to iPadModel & " " & iPadColor | |
set iPadStorage to button returned of (display dialog "Select the size of iPad you're looking for." buttons {"16GB", "32GB", "64GB"}) |
OlderNewer