text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set MyModDay to myMonthName & " " & myDay & ", " & myYear | Checkpoint Navigator.applescript |
set myModCheckPoint to MyModDay & ", " & myModHour & ":" & myTimeMinute & " " & myModZone | Checkpoint Navigator.applescript |
set myModCheckPointList to myModCheckPointList & {myModCheckPoint} | Checkpoint Navigator.applescript |
set mySelection to choose from list myModCheckPointList with prompt "Please select the checkpoint to examine:" | Checkpoint Navigator.applescript |
if mySelection is not false then | Checkpoint Navigator.applescript |
repeat with i from 1 to the count of myModCheckPointList | Checkpoint Navigator.applescript |
if (item i of myModCheckPointList) is (mySelection as string) then set mySelectionIndex to i | Checkpoint Navigator.applescript |
do shell script "open " & myCheckPointPath & "/" & item mySelectionIndex of myCheckPointList | Checkpoint Navigator.applescript |
on error number errnum | Checkpoint Navigator.applescript |
display dialog "An error has occured! [# " & errnum & "]" & return & "I was trying to open the checkpoint." buttons {"Exit"} default button 1 with icon stop giving up after 1 | Checkpoint Navigator.applescript |
display dialog "User cancelled script." buttons {"Exit"} default button 1 with icon stop | Checkpoint Navigator.applescript |
property ScriptLoader : load script alias ((path to scripts folder from user domain as text) & "file:ScriptLoader.scpt") --prerequisite for loading .applescript files | GitModifier.applescript |
property TextAsserter : my ScriptLoader's load_script(alias ((path to scripts folder from user domain as text) & "text:TextAsserter.applescript")) | GitModifier.applescript |
property git_path : "/usr/local/git/bin/" --to execute git commands we need to call the git commands from this path | GitModifier.applescript |
on add(local_repo_path, file_name) | GitModifier.applescript |
log ("GitModifier's add(" & local_repo_path & file_name & ")") | GitModifier.applescript |
if (TextAsserter's is_wrapped_in(file_name, "\"") = false) then --avoids quoting a file_name that is already quoated, this can happen when git removes a file | GitModifier.applescript |
set file_name to quoted form of file_name | GitModifier.applescript |
set shell_cmd to "cd " & local_repo_path & ";" & git_path & "git add" & " " & file_name | GitModifier.applescript |
return do shell script shell_cmd | GitModifier.applescript |
end add | GitModifier.applescript |
on commit(local_repo_path, message_title, message_description) | GitModifier.applescript |
log ("GitModifier's commit(" & message_title & ")") | GitModifier.applescript |
return do shell script "cd " & local_repo_path & ";" & git_path & "git commit" & " " & "-m" & " '" & message_title & "' " & "-m" & " '" & message_description & "'" | GitModifier.applescript |
end commit | GitModifier.applescript |
on push(local_repo_path, remote_repo_url, user_name, user_password, branch) | GitModifier.applescript |
log ("GitModifier's push(" & "local_path: " & local_repo_path & ", remote_path: " & remote_repo_url & ", user: " & user_name & ", pass: " & user_password & ", branch: " & branch & ")") | GitModifier.applescript |
set remote_loc to "https://" & user_name & ":" & user_password & "@" & remote_repo_url --https://user:pass@github.com/user/repo.git--"origin" | GitModifier.applescript |
set shell_cmd to "cd " & local_repo_path & ";" & git_path & "git push" & " " & remote_loc & " " & branch | GitModifier.applescript |
end push | GitModifier.applescript |
on reset(local_repo_path, file_name) | GitModifier.applescript |
return do shell script "cd " & local_repo_path & ";" & git_path & "git reset" & " " & file_name | GitModifier.applescript |
end reset | GitModifier.applescript |
on clean() | GitModifier.applescript |
end clean | GitModifier.applescript |
on pull(local_repo_path, remote_repo_url, user_name, user_password) --TODO: add branch here | GitModifier.applescript |
set remote_loc to "https://" & user_name & ":" & user_password & "@" & remote_repo_url | GitModifier.applescript |
set target_branch to "master" --master branch | GitModifier.applescript |
return do shell script "cd " & local_repo_path & ";" & git_path & "git pull" & " " & remote_loc & " " & target_branch | GitModifier.applescript |
end pull | GitModifier.applescript |
on revert() | GitModifier.applescript |
end revert | GitModifier.applescript |
on remove() | GitModifier.applescript |
end remove | GitModifier.applescript |
on init(local_repo_path) | GitModifier.applescript |
set shell_cmd to "cd " & local_repo_path & ";" & git_path & "git init" | GitModifier.applescript |
log "shell_cmd: " & shell_cmd | GitModifier.applescript |
on attach_remote_repo(local_repo_path, remote_repo_path) | GitModifier.applescript |
set shell_cmd to "cd " & local_repo_path & ";" & git_path & "git remote add origin" & " " & (quoted form of remote_repo_path) | GitModifier.applescript |
end attach_remote_repo | GitModifier.applescript |
on detach_remote_repo(local_repo_path) | GitModifier.applescript |
set shell_cmd to "cd " & local_repo_path & ";" & git_path & "git remote rm origin" | GitModifier.applescript |
end detach_remote_repo | GitModifier.applescript |
on clone(remote_path, local_path) | GitModifier.applescript |
set shell_cmd to git_path & "git clone " & remote_path & " " & local_path | GitModifier.applescript |
end clone | GitModifier.applescript |
on config() | GitModifier.applescript |
end config | GitModifier.applescript |
on git_remote_update(local_repo_path) | GitModifier.applescript |
return do shell script "cd " & local_repo_path & ";" & git_path & "git remote update" | GitModifier.applescript |
end git_remote_update | GitModifier.applescript |
on remote() | GitModifier.applescript |
end remote | GitModifier.applescript |
on check_out(local_repo_path, loc, file_path) | GitModifier.applescript |
log ("GitModifier's check_out(" & loc & " " & file_path & ")") | GitModifier.applescript |
set shell_cmd to "cd " & local_repo_path & ";" & git_path & "git checkout " & loc | GitModifier.applescript |
if file_path is not space then | GitModifier.applescript |
set shell_cmd to shell_cmd & " " & file_path | GitModifier.applescript |
end check_out | GitModifier.applescript |
on fetch(local_repo_path, remote_path, branch) | GitModifier.applescript |
log ("GitModifier's fetch(" & branch & ")") | GitModifier.applescript |
set shell_cmd to "cd " & local_repo_path & ";" & git_path & "git fetch " & "origin" | GitModifier.applescript |
if branch is not space then | GitModifier.applescript |
set shell_cmd to shell_cmd & " " & branch | GitModifier.applescript |
end fetch | GitModifier.applescript |
on branch(target_branch, delete_flag) | GitModifier.applescript |
end branch | GitModifier.applescript |
on merge(local_repo_path, into_branch, from_branch) | GitModifier.applescript |
log ("GitModifier's merge()") | GitModifier.applescript |
set shell_cmd to "cd " & local_repo_path & ";" & git_path & "git merge " & into_branch & " " & from_branch | GitModifier.applescript |
end merge | GitModifier.applescript |
on rebase() | GitModifier.applescript |
end rebase | GitModifier.applescript |
on stash(title) | GitModifier.applescript |
end stash | GitModifier.applescript |
set caseId to "dec-keyboard-dvorak-cmd-spotCheck" | dec-syseve-with-sublime-text.applescript |
Basic Test | dec-syseve-with-sublime-text.applescript |
set sut to std's import("system-events")'s new() | dec-syseve-with-sublime-text.applescript |
if name of sut is not "SyseveSublimeTextInstance" then set sut to decorate(sut) | dec-syseve-with-sublime-text.applescript |
activate application "Sublime Text" | dec-syseve-with-sublime-text.applescript |
logger's infof("Process Name: {}", sut's getFrontAppName()) | dec-syseve-with-sublime-text.applescript |
on decorate(baseScript) | dec-syseve-with-sublime-text.applescript |
script SyseveSublimeTextInstance | dec-syseve-with-sublime-text.applescript |
property parent : baseScript | dec-syseve-with-sublime-text.applescript |
on getFrontAppName() | dec-syseve-with-sublime-text.applescript |
set frontAppName to continue getFrontAppName() | dec-syseve-with-sublime-text.applescript |
if frontAppName is "sublime_text" then return "Sublime Text" | dec-syseve-with-sublime-text.applescript |
frontAppName | dec-syseve-with-sublime-text.applescript |
end getFrontAppName | dec-syseve-with-sublime-text.applescript |
end decorate | dec-syseve-with-sublime-text.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.