Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created August 17, 2009 06:45
Show Gist options
  • Save defunkt/168954 to your computer and use it in GitHub Desktop.
Save defunkt/168954 to your computer and use it in GitHub Desktop.
#!/usr/bin/osascript
run_command("cd ~/Projects/nudge")
run_command("./bin/nudged")
open_tab()
run_command("cd ~/Projects/nudge")
run_command("./bin/nudged -p 31312")
open_tab()
run_command("cd ~/Projects/nudge")
run_command("ruby examples/client.rb")
open_tab()
run_command("cd ~/Projects/nudge")
run_command("ruby examples/client.rb")
open_tab()
run_command("cd ~/Projects/nudge")
run_command("echo Welcome to nudge.")
--- sexy dsl
on run_command(command)
tell application "Terminal"
do script "clear" in selected tab of front window
do script command in selected tab of front window
end tell
end run_command
on open_tab()
tell application "System Events"
keystroke "t" using {command down}
end tell
end open_tab
on new_window()
tell application "System Events"
keystroke "n" using {command down}
end tell
end new_window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment