text
stringlengths
0
15.7k
source
stringlengths
6
112
if not (exists (flattened project bd_project)) then
OmniBirthdays.applescript
set homeContext to first flattened context whose name is bd_context
OmniBirthdays.applescript
make new project with properties {name:bd_project, flagged:true, singleton action holder:true, context:homeContext}
OmniBirthdays.applescript
end create_birthday_project
OmniBirthdays.applescript
on make_task()
OmniBirthdays.applescript
set the_project to first flattened project whose name is bd_project
OmniBirthdays.applescript
repeat with n in bd_list
OmniBirthdays.applescript
set task_title to "Wish " & name of n & " a happy birthday!"
OmniBirthdays.applescript
if not (task_title is in existing_list) then
OmniBirthdays.applescript
set the_date to birth_date of n
OmniBirthdays.applescript
set year of the_date to 2013
OmniBirthdays.applescript
if the_date < (current date) then set year of the the_date to 2014
OmniBirthdays.applescript
tell the_project to make new task with properties {name:task_title, start date:the_date, repetition rule:{recurrence:"FREQ=YEARLY", repetition method:fixed repetition}}
OmniBirthdays.applescript
end make_task
OmniBirthdays.applescript
on check_existing()
OmniBirthdays.applescript
set existing_list to {}
OmniBirthdays.applescript
set new_tasks to tasks of flattened project bd_project
OmniBirthdays.applescript
repeat with new_task in new_tasks
OmniBirthdays.applescript
set end of existing_list to name of new_task
OmniBirthdays.applescript
end check_existing
OmniBirthdays.applescript
set mailSubject to "Delegated Task from Jered Benoit: "
DelegateFromOmniFocus.scpt
set sendToOmnifocus to true
DelegateFromOmniFocus.scpt
set openInOmniFocus to true
DelegateFromOmniFocus.scpt
set runDeferScript to true
DelegateFromOmniFocus.scpt
set DeferScript to "/Users/Jeredb/Library/Scripts/Applications/OmniFocus/Defer.scpt"
DelegateFromOmniFocus.scpt
set runDelegateScript to true
DelegateFromOmniFocus.scpt
set DelegatedScript to "/Users/Jeredb/Library/Scripts/Applications/OmniFocus/Delegated.scpt"
DelegateFromOmniFocus.scpt
if runDeferScript is true then run script (DeferScript)
DelegateFromOmniFocus.scpt
if runDelegateScript is true then run script (DelegatedScript)
DelegateFromOmniFocus.scpt
set SelectedItemInMainView to selected trees of content
DelegateFromOmniFocus.scpt
set theSelectedTask to value of item 1 of SelectedItemInMainView
DelegateFromOmniFocus.scpt
set nameSelectedTask to name of theSelectedTask
DelegateFromOmniFocus.scpt
set noteSelectedTask to note of theSelectedTask
DelegateFromOmniFocus.scpt
set idSelectedTask to id of theSelectedTask
DelegateFromOmniFocus.scpt
set encodedName to my urlencode(nameSelectedTask as rich text)
DelegateFromOmniFocus.scpt
set encodedNote to my urlencode(noteSelectedTask as rich text)
DelegateFromOmniFocus.scpt
set addToOFLink to "<omnifocus:///add?name=" & encodedName & "&note=" & encodedNote & ">"
DelegateFromOmniFocus.scpt
set openInOFLink to "<omnifocus:///task/" & idSelectedTask & ">"
DelegateFromOmniFocus.scpt
set mailSubject to mailSubject & nameSelectedTask
DelegateFromOmniFocus.scpt
set mailContent to nameSelectedTask & return & "Note: " & noteSelectedTask & return
DelegateFromOmniFocus.scpt
if sendToOmnifocus is true then set mailContent to mailContent & "Add this task to Omnifocus: " & addToOFLink
DelegateFromOmniFocus.scpt
if openInOmniFocus is true then set mailContent to mailContent & return & "Open in Omnifocus: " & openInOFLink
DelegateFromOmniFocus.scpt
display dialog "No task selected!" with icon caution
DelegateFromOmniFocus.scpt
set newMessage to make new outgoing message with properties {subject:mailSubject, content:mailContent}
DelegateFromOmniFocus.scpt
property ffmpeg : "/usr/local/bin/ffmpeg"
FFmpegConverter.applescript
repeat with f in (choose file default location (name of front window of application "Finder") with multiple selections allowed)
FFmpegConverter.applescript
main(f)
FFmpegConverter.applescript
on open args
FFmpegConverter.applescript
repeat with f in args
FFmpegConverter.applescript
on main(input)
FFmpegConverter.applescript
set input to quoted form of POSIX path of input
FFmpegConverter.applescript
copy text item delimiters of AppleScript to save_IFS
FFmpegConverter.applescript
copy space to text item delimiters of AppleScript
FFmpegConverter.applescript
set cmd to {ffmpeg, "-i", input, "-acodec copy", "-vcodec copy", input & ".mp4", ";", "exit"} as string
FFmpegConverter.applescript
copy save_IFS to text item delimiters of AppleScript
FFmpegConverter.applescript
tell application "Terminal" to activate (do script cmd)
FFmpegConverter.applescript
global std, retry
viscosity.applescript
set thisCaseId to "viscosity-spotCheck"
viscosity.applescript
set stepTwo to std's import("step-two")'s new()
viscosity.applescript
set viscosityProcess to std's import("process")'s new("Viscosity")
viscosity.applescript
viscosityProcess's terminate()
viscosity.applescript
set domainKey to configBusiness's getValue("Domain Key")
viscosity.applescript
logger's debugf("domainKey: {}", domainKey)
viscosity.applescript
script OtpRetrieverInstance
viscosity.applescript
on getOTP()
viscosity.applescript
set OTP_APP_NAME to "Step Two"
viscosity.applescript
if running of application OTP_APP_NAME is false then
viscosity.applescript
activate application OTP_APP_NAME
viscosity.applescript
stepTwo's filter(domainKey)
viscosity.applescript
return stepTwo's getFirstOTP()
viscosity.applescript
end getOTP
viscosity.applescript
set sut to new(OtpRetrieverInstance)
viscosity.applescript
exec of retry on sut by 1 for 100
viscosity.applescript
on new(pOtpRetriever)
viscosity.applescript
if pOtpRetriever is missing value then
viscosity.applescript
error "You need to pass a valid OTP retriever"
viscosity.applescript
script ViscosityInstance
viscosity.applescript
property otpRetriever : pOtpRetriever
viscosity.applescript
if not (running of application "Viscosity") then activate application "Viscosity"
viscosity.applescript
tell application "System Events" to tell process "Viscosity"
viscosity.applescript
if state of first connection is "Connected" then return true
viscosity.applescript
connect WORK_NAME
viscosity.applescript
if exists (button "OK" of window "") then click button "OK" of window ""
viscosity.applescript
if exists (window "Preferences") then click first button of window "Preferences"
viscosity.applescript
if exists (window "Details") then click first button of window "Details"
viscosity.applescript
if exists (button "OK" of (first window whose name starts with "Viscosity")) then
viscosity.applescript
logger's info("Getting OTP...")
viscosity.applescript
set otp to my OtpRetriever's getOTP()
viscosity.applescript
logger's debugf("otp: {}", otp)
viscosity.applescript
if otp is not missing value then
viscosity.applescript
my fillOTP(otp)
viscosity.applescript
missing value -- Keep this so we don't inadvertently exit the loop
viscosity.applescript
on extractOTP()
viscosity.applescript
tell pwd
viscosity.applescript
set unlocked to waitToUnlockNext()
viscosity.applescript
if not unlocked then
viscosity.applescript
logger's warn("1Password did not unlock :(")
viscosity.applescript
selectCategory("Logins")
viscosity.applescript
set theOtp to doGetOTP(WORK_CRED_KEY)
viscosity.applescript
return theOtp
viscosity.applescript