text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set selected_item to item 1 of the_action | GitSync.applescript |
set last_selected_action to selected_item | GitSync.applescript |
if selected_item is item 1 of options then --keep local version | GitSync.applescript |
GitModifier's check_out(local_repo_path, "--ours", unmerged_file) | GitSync.applescript |
else if selected_item is item 2 of options then --keep remote version | GitSync.applescript |
GitModifier's check_out(local_repo_path, "--theirs", unmerged_file) | GitSync.applescript |
else if selected_item is item 3 of options then --keep mix of both versions | GitSync.applescript |
GitModifier's check_out(local_repo_path, branch, unmerged_file) | GitSync.applescript |
else if selected_item is item 4 of options then --open local version | GitSync.applescript |
FileUtil's open_file(local_repo_path & unmerged_file) | GitSync.applescript |
else if selected_item is item 5 of options then --open remote version | GitSync.applescript |
else if selected_item is item 6 of options then --open mix of both versions | GitSync.applescript |
else if selected_item is item 7 of options then --keep all local versions | GitSync.applescript |
GitModifier's check_out(local_repo_path, "--ours", "*") | GitSync.applescript |
else if selected_item is item 8 of options then --keep all remote versions | GitSync.applescript |
GitModifier's check_out(local_repo_path, "--theirs", "*") | GitSync.applescript |
else if selected_item is item 9 of options then --keep all local and remote versions | GitSync.applescript |
GitModifier's check_out(local_repo_path, branch, "*") | GitSync.applescript |
else if selected_item is item 10 of options then --open all local versions | GitSync.applescript |
FileUtil's open_files(FileParser's full_hsf_paths(local_repo_path, unmerged_files)) | GitSync.applescript |
else if selected_item is item 11 of options then --open all remote versions | GitSync.applescript |
else if selected_item is item 12 of options then --open all mixed versions | GitSync.applescript |
end handle_merge_conflict_dialog | GitSync.applescript |
function netinfo -d "get network information" | netinfo.scpt |
set public (dig +short myip.opendns.com @resolver1.opendns.com) | netinfo.scpt |
if test -z "$public" # No Internet connection | netinfo.scpt |
set public "No Internet connection available" | netinfo.scpt |
echo " " | netinfo.scpt |
echo -n " Public IP: "; set_color -i; echo $public; set_color normal | netinfo.scpt |
echo -n " Hostname: "; set_color -i; echo (uname -n); set_color normal | netinfo.scpt |
set ports (ifconfig -uv | grep '^[a-z0-9]' | awk -F : '{print $1}') | netinfo.scpt |
for val in $ports | netinfo.scpt |
set activated (ifconfig -uv $val | grep 'status: ' | awk '{print $2}') | netinfo.scpt |
if test $activated = 'active' ^/dev/null | netinfo.scpt |
set ipaddress (ifconfig -uv $val | grep 'inet ' | awk '{print $2}') | netinfo.scpt |
if test -n "$ipaddress" ^/dev/null | netinfo.scpt |
set label (ifconfig -uv $val | grep 'type' | awk '{print $2}') | netinfo.scpt |
set macaddress (ifconfig -uv $val | grep 'ether ' | awk '{print $2}') | netinfo.scpt |
set quality (ifconfig -uv $val | grep 'link quality:' | awk '{print $3, $4}') | netinfo.scpt |
set netmask (ipconfig getpacket $val | grep 'subnet_mask (ip):' | awk '{print $3}') | netinfo.scpt |
set router (ipconfig getpacket $val | grep 'router (ip_mult):' | sed 's/.*router (ip_mult): {\([^}]*\)}.*/\1/') | netinfo.scpt |
set dnsserver (ipconfig getpacket $val | grep 'domain_name_server (ip_mult):' | sed 's/.*domain_name_server (ip_mult): {\([^}]*\)}.*/\1/') | netinfo.scpt |
set logger to std's import("logger")'s new("hello") | hello copy 2.applescript |
set myConnection to the service "ZJUWLAN" | VpnToggle.applescript |
if current configuration of myConnection is not connected then | VpnToggle.applescript |
connect myConnection | VpnToggle.applescript |
display notification "Connected to ZJUWLAN" | VpnToggle.applescript |
disconnect myConnection | VpnToggle.applescript |
display notification "Disconnected to ZJUWLAN" | VpnToggle.applescript |
property defaultFolderName : "Email" | Add Selected Message to Notes.applescript |
display alert "No Messages Selected" message "Select the message you want to add first." | Add Selected Message to Notes.applescript |
set theTitle to subject of theMessage | Add Selected Message to Notes.applescript |
set theNote to content of theMessage | Add Selected Message to Notes.applescript |
make new note at f with properties {body:theNote, name:theTitle} | Add Selected Message to Notes.applescript |
set myOut to open for access "./tout.txt" with write permission | test copy 11.applescript |
write "test" to myOut | test copy 11.applescript |
set scriptName to " Hide/Unhide Columns" | hide_unhide_column.scpt |
on columnHandler(task, columns) | hide_unhide_column.scpt |
if task is not equal to "hide" and task is not equal to "unhide" then | hide_unhide_column.scpt |
display notification "Incorrect task: \"" & task & "\", script cancelled" | hide_unhide_column.scpt |
if class of columns ≠ list then | hide_unhide_column.scpt |
display notification "Incorrect columns: \"" & (list as string) & "\", script cancelled" | hide_unhide_column.scpt |
repeat with theColumn in columns | hide_unhide_column.scpt |
if task = "hide" then | hide_unhide_column.scpt |
set hidden of (entire column of (range theColumn)) to true | hide_unhide_column.scpt |
else if task = "unhide" then | hide_unhide_column.scpt |
set hidden of (entire column of (range theColumn)) to false | hide_unhide_column.scpt |
end columnHandler | hide_unhide_column.scpt |
my columnHandler("hide", {"A:B", "E:E"}) | hide_unhide_column.scpt |
if value of (radio button "Selection" of sheet 1 of window 1) is 0 then | Keynote 7 to PDF.applescript |
click (radio button "Selection" of sheet 1 of window 1) | Keynote 7 to PDF.applescript |
quartalForDate(current date) | quartalForDate.applescript |
on quartalForDate(aDate) | quartalForDate.applescript |
set monthNumber to month of aDate as integer | quartalForDate.applescript |
return ((monthNumber - 1) div 3) + 1 | quartalForDate.applescript |
end quartalForDate | quartalForDate.applescript |
short user name of (get system info) | short user name of (get system info).applescript |
scale this_file by factor 0.5 | Scale to 50%.applescript |
set EXIFoutput to return | Aperture-Update-EXIF-GPS.scpt |
set DesiredEXIFData to "" | Aperture-Update-EXIF-GPS.scpt |
set imageSel to (get selection) | Aperture-Update-EXIF-GPS.scpt |
if imageSel is {} then | Aperture-Update-EXIF-GPS.scpt |
display dialog "Please select an image in Aperture" with title "EXIF Data" buttons {"Okay"} | Aperture-Update-EXIF-GPS.scpt |
repeat with cur_pic in imageSel | Aperture-Update-EXIF-GPS.scpt |
tell cur_pic | Aperture-Update-EXIF-GPS.scpt |
set lon to get longitude | Aperture-Update-EXIF-GPS.scpt |
set myPath to getPath(cur_pic) | Aperture-Update-EXIF-GPS.scpt |
log "/usr/local/bin/exiftool -overwrite_original_in_place -P -exif:GPSLatitude=" & lat & " -exif:GPSLatitudeRef=North -exif:GPSLongitude=" & lon & " -exif:GPSLongitudeRef=West " & myPath | Aperture-Update-EXIF-GPS.scpt |
do shell script "/usr/local/bin/exiftool -overwrite_original_in_place -P -exif:GPSLatitude=" & lat & " -exif:GPSLatitudeRef=North -exif:GPSLongitude=" & lon & " -exif:GPSLongitudeRef=West " & myPath | Aperture-Update-EXIF-GPS.scpt |
on getPath(aItem) | Aperture-Update-EXIF-GPS.scpt |
tell aItem | Aperture-Update-EXIF-GPS.scpt |
set MasterFile to (get value of other tag "FileName") | Aperture-Update-EXIF-GPS.scpt |
set isReferenced to get referenced | Aperture-Update-EXIF-GPS.scpt |
if isReferenced then | Aperture-Update-EXIF-GPS.scpt |
set FinderPath to choose file MasterFile with prompt "Please locate referenced file" | Aperture-Update-EXIF-GPS.scpt |
set thePath to POSIX path of FinderPath | Aperture-Update-EXIF-GPS.scpt |
set ImpGroup to (get value of other tag "ImportGroup") | Aperture-Update-EXIF-GPS.scpt |
set MasterPath to my GetMasterPath(ImpGroup) | Aperture-Update-EXIF-GPS.scpt |
set MasterPath to my getLibPath() & MasterPath | Aperture-Update-EXIF-GPS.scpt |
set thePath to quoted form of (MasterPath & MasterFile) | Aperture-Update-EXIF-GPS.scpt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.