text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
on sftpPromptPattern()
|
dec-terminal-prompt-sftp.applescript
|
"sftp>"
|
dec-terminal-prompt-sftp.applescript
|
end sftpPromptPattern
|
dec-terminal-prompt-sftp.applescript
|
set logger to std's import("logger")'s new("dec-terminal-prompt-sftp")
|
dec-terminal-prompt-sftp.applescript
|
set US to {"@", "#", "$", "^", "&", "Q", "q", "W", "w", "E", "e", "R", "r", "T", "t", "Y", "y", "U", "u", "I", "i", "O", "o", "P", "p", "{", "[", "}", "]", "|", "\"", "A", "a", "S", "s", "D", "d", "F", "f", "G", "g", "H", "h", "J", "j", "K", "k", "L", "l", ":", ";", "\"", "'", "Z", "z", "X", "x", "C", "c", "V", "v", "B", "b", "N", "n", "M", "m", "<", ",", ">", ".", "?", "/"} as list
|
ConvertTextBetweenInputSources.applescript
|
set Russian_PC to {"\"", "№", ";", ":", "?", "Й", "й", "Ц", "ц", "У", "у", "К", "к", "Е", "е", "Н", "н", "Г", "г", "Ш", "ш", "Щ", "щ", "З", "з", "Х", "х", "Ъ", "ъ", "/", "\"", "Ф", "ф", "Ы", "ы", "В", "в", "А", "а", "П", "п", "Р", "р", "О", "о", "Л", "л", "Д", "д", "Ж", "ж", "Э", "э", "Я", "я", "Ч", "ч", "С", "с", "М", "м", "И", "и", "Т", "т", "Ь", "ь", "Б", "б", "Ю", "ю", ",", "."} as list
|
ConvertTextBetweenInputSources.applescript
|
display dialog "Choose direction:" buttons {"Russian - PC → U.S.", "U.S. → Russian - PC", "Cancel"} default button 2 cancel button 3 with title "Convert Text Between Input Sources" with icon (path to resource "BookmarkIcon.icns" in bundle ((path to library folder from system domain as string) & "CoreServices:CoreTypes.bundle") as alias)
|
ConvertTextBetweenInputSources.applescript
|
if button returned of result = "Russian - PC → U.S." then
|
ConvertTextBetweenInputSources.applescript
|
set input to get convert(Russian_PC, US, input)
|
ConvertTextBetweenInputSources.applescript
|
if button returned of result = "U.S. → Russian - PC" then
|
ConvertTextBetweenInputSources.applescript
|
set input to get convert(US, Russian_PC, input)
|
ConvertTextBetweenInputSources.applescript
|
on convert(wrongScript, correctScript, subject)
|
ConvertTextBetweenInputSources.applescript
|
repeat with i from 1 to length of wrongScript
|
ConvertTextBetweenInputSources.applescript
|
set TID to text item delimiters of AppleScript
|
ConvertTextBetweenInputSources.applescript
|
set text item delimiters of AppleScript to item i of wrongScript
|
ConvertTextBetweenInputSources.applescript
|
set text item delimiters of AppleScript to item i of correctScript
|
ConvertTextBetweenInputSources.applescript
|
set text item delimiters of AppleScript to TID
|
ConvertTextBetweenInputSources.applescript
|
on stringJoin(theList, theDelimiter)
|
String Library.scpt
|
display alert errStr
|
String Library.scpt
|
end stringJoin
|
String Library.scpt
|
on reMatch(theText, regex)
|
String Library.scpt
|
return reExtract(theText, regex, 0) is not ""
|
String Library.scpt
|
end reMatch
|
String Library.scpt
|
on reExtract(theText, regex, capture)
|
String Library.scpt
|
return do shell script "ruby <<ahz3Yaazah2see
|
String Library.scpt
|
raw_text = <<'voh2veemeecaoZ'
|
String Library.scpt
|
regex = <<'ouJe4ohgei7kie0zeg4c'
|
String Library.scpt
|
" & regex & "
|
String Library.scpt
|
ouJe4ohgei7kie0zeg4c
|
String Library.scpt
|
capture = <<'aev3NaebuneeKe7Uiph6'
|
String Library.scpt
|
" & capture & "
|
String Library.scpt
|
aev3NaebuneeKe7Uiph6
|
String Library.scpt
|
capture = capture.to_i
|
String Library.scpt
|
puts raw_text.chomp[Regexp.new(regex.chomp), capture]
|
String Library.scpt
|
end reExtract
|
String Library.scpt
|
on reReplace(theText, regex, replace)
|
String Library.scpt
|
replace = <<'zoophie7shahpuXuurai'
|
String Library.scpt
|
" & replace & "
|
String Library.scpt
|
zoophie7shahpuXuurai
|
String Library.scpt
|
puts raw_text.gsub(Regexp.new(regex.chomp), replace.chomp)
|
String Library.scpt
|
end reReplace
|
String Library.scpt
|
property html2text : "/Users/knightli/workspace/fiddler/markdown-evernote/html2text.py"
|
evernote2markdown.scpt
|
property LF : (ASCII character 32) & (ASCII character 32) & (ASCII character 10)
|
evernote2markdown.scpt
|
property DocsFolder : POSIX path of (path to documents folder)
|
evernote2markdown.scpt
|
if is_running("Evernote") = false then
|
evernote2markdown.scpt
|
tell application id "com.evernote.Evernote" to launch
|
evernote2markdown.scpt
|
set Evernote_Selection to selection
|
evernote2markdown.scpt
|
if Evernote_Selection is {} then display dialog "Please select a note."
|
evernote2markdown.scpt
|
repeat with i from 1 to the count of Evernote_Selection
|
evernote2markdown.scpt
|
set theTitle to title of item i of Evernote_Selection
|
evernote2markdown.scpt
|
set theNotebook to name of notebook of item i of Evernote_Selection
|
evernote2markdown.scpt
|
set theTags to tags of item i of Evernote_Selection
|
evernote2markdown.scpt
|
set noteTags_list to {}
|
evernote2markdown.scpt
|
repeat with j from 1 to count of theTags
|
evernote2markdown.scpt
|
set tagName to name of item j of theTags
|
evernote2markdown.scpt
|
copy tagName to the end of noteTags_list
|
evernote2markdown.scpt
|
set theTags to my joinList(noteTags_list, ", ")
|
evernote2markdown.scpt
|
set noteHTML to HTML content of item i of Evernote_Selection
|
evernote2markdown.scpt
|
set noteHTML to change "\\<body style(.*?)\\>" into "" in noteHTML with regexp
|
evernote2markdown.scpt
|
set noteHTML to change "\\<\\?xml(.*?)\\>" into "" in noteHTML with regexp
|
evernote2markdown.scpt
|
set noteHTML to change "\\<\\!DOC(.*?)\\>" into "" in noteHTML with regexp
|
evernote2markdown.scpt
|
set noteHTML to change "\\<html(.*?)\\>" into "" in noteHTML with regexp
|
evernote2markdown.scpt
|
set noteHTML to change "\\<span style(.*?)\\>" into "" in noteHTML with regexp
|
evernote2markdown.scpt
|
set theMarkdown to do shell script "python " & html2text & " \"" & noteHTML & "\""
|
evernote2markdown.scpt
|
set theMarkdown to "# " & theTitle & " " & LF & "= " & theNotebook & " " & LF & "@ " & theTags & " " & LF & LF & LF & theMarkdown
|
evernote2markdown.scpt
|
set the clipboard to theMarkdown
|
evernote2markdown.scpt
|
if theTitle contains "/" then
|
evernote2markdown.scpt
|
set theTitle to my replaceString(theTitle, "/", "-")
|
evernote2markdown.scpt
|
set shellTitle to quoted form of theTitle
|
evernote2markdown.scpt
|
do shell script "cd " & DocsFolder & "; mkdir -p Evernote_Markdown_Notes; cd Evernote_Markdown_Notes/; touch " & shellTitle & ".md; open -a TextMate " & shellTitle & ".md"
|
evernote2markdown.scpt
|
tell process "TextMate"
|
evernote2markdown.scpt
|
if (selection as string) is "" then
|
tex-itemize.applescript
|
if (theselection as string) is "" then
|
tex-itemize.applescript
|
set final_string to "\\begin{itemize} \\item \\end{itemize}"
|
tex-itemize.applescript
|
repeat with x in lines of selection
|
tex-itemize.applescript
|
replace "^" using "\\\\begin{itemize}\\n\\\\item \\n\\\\end{itemize}" searching in text of x options {search mode:grep}
|
tex-itemize.applescript
|
set lineno to 0
|
tex-itemize.applescript
|
replace "^" using "\\\\item " searching in text of x options {search mode:grep}
|
tex-itemize.applescript
|
set lineno to (lineno + 1)
|
tex-itemize.applescript
|
replace "^" using "\\\\begin{itemize}\\n" searching in text of theselection options {search mode:grep}
|
tex-itemize.applescript
|
set theselection to line (get endLine of selection)
|
tex-itemize.applescript
|
replace "$" using "\\n\\\\end{itemize}" searching in text of theselection options {search mode:grep}
|
tex-itemize.applescript
|
set startDate to date "Friday, February 17, 2023 at 2:40:00 PM"
|
Shift class start times for change of season.applescript
|
set theCalendars to calendars
|
Shift class start times for change of season.applescript
|
repeat with theCalendar in theCalendars
|
Shift class start times for change of season.applescript
|
set theEvents to theEvents & (every event in theCalendar ¬
|
Shift class start times for change of season.applescript
|
whose start date = startDate)
|
Shift class start times for change of season.applescript
|
set theStartDate to start date of theEvent
|
Shift class start times for change of season.applescript
|
set theNewStartDate to theStartDate - (20 * minutes)
|
Shift class start times for change of season.applescript
|
set theEndDate to end date of theEvent
|
Shift class start times for change of season.applescript
|
set theNewEndDate to theEndDate - (20 * minutes)
|
Shift class start times for change of season.applescript
|
set start date of theEvent to theNewStartDate
|
Shift class start times for change of season.applescript
|
set end date of theEvent to theNewEndDate
|
Shift class start times for change of season.applescript
|
global upperChars, lowerChars, nums
|
password-generator.applescript
|
set upperChars to "ABCDEFGHJKLMNPQRSTUVWXYZ"
|
password-generator.applescript
|
set lowerChars to "abcdefghijkmnopqrstuvwxyz"
|
password-generator.applescript
|
set nums to "0123456789"
|
password-generator.applescript
|
displayAlert()
|
password-generator.applescript
|
on displayAlert()
|
password-generator.applescript
|
set generatedPassword to generatePassword()
|
password-generator.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.