Skip to content

Instantly share code, notes, and snippets.

@bsnux
Created February 19, 2014 19:38
Show Gist options
  • Save bsnux/9099896 to your computer and use it in GitHub Desktop.
Save bsnux/9099896 to your computer and use it in GitHub Desktop.
launch "iTerm"
tell application "iTerm"
set dev_directory to "path/to/your/project"
set django_port to "8000"
tell the current terminal
activate current session
launch session "Default Session"
tell the last session to write text "cd " & dev_directory & "&& . env/bin/activate && djr " & django_port
tell i term application "System Events" to keystroke "d" using command down
tell the last session to write text "cd " & dev_directory & "&& . env/bin/activate && djs"
tell i term application "System Events" to keystroke "D" using command down
tell the last session to write text "cd " & dev_directory & "&& . env/bin/activate"
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment