Skip to content

Instantly share code, notes, and snippets.

@cupnoodle
Created November 25, 2020 09:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cupnoodle/2dfdb4fddccb3366dcf1417d1f23253f to your computer and use it in GitHub Desktop.
Save cupnoodle/2dfdb4fddccb3366dcf1417d1f23253f to your computer and use it in GitHub Desktop.
AppleScript to run rails server, webpack dev server and rails console
tell application "Terminal"
activate
do script "rails server" in tab 1 of front window
my makeTab()
do script "./bin/webpack-dev-server" in selected tab of front window
delay 1
my makeTab()
do script "rails console" in selected tab of front window
end tell
on makeTab()
tell application "System Events" to keystroke "t" using {command down}
delay 0.2
end makeTab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment