Skip to content

Instantly share code, notes, and snippets.

@dce
Forked from defunkt/after-use
Created August 27, 2009 18:52
Show Gist options
  • Save dce/176471 to your computer and use it in GitHub Desktop.
Save dce/176471 to your computer and use it in GitHub Desktop.
#!/usr/bin/osascript
run_command("cd ~/Projects/resque")
run_command("redis-server redis.conf")
open_tab()
run_command("cd ~/Projects/resque")
run_command("shotgun config.ru")
open_tab()
run_command("cd ~/Projects/github")
run_command("git checkout resque")
run_command("QUEUE=critical,high rake jobs:work")
open_tab()
run_command("cd ~/Projects/github")
run_command("QUEUE=critical rake jobs:work")
open_tab()
run_command("cd ~/Projects/resque")
run_command("echo Welcome to Resque.")
run_command("sleep 1") --- wait for web server to boot up
run_command("open http://localhost:9393")
--- 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