Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Replace this with the path to your repository
# Replace with the name of your conda environment
# Helper function.
# Opens a new tab and executes a command in iTerm2
# Credit:
osascript \
-e 'tell application "iTerm2" to tell current window to set newWindow to (create tab with default profile)'\
-e "tell application \"iTerm2\" to tell current session of newWindow to write text \"${@}\""
# Open a new tab and start running the local web dev server
newtabi "conda activate ${CONDA_ENV} && cd ${REPOSITORY_DIR} && yarn watch"
# Open another new tab and open up JupyterLab
newtabi "conda activate ${CONDA_ENV} && cd ${REPOSITORY_DIR} && jupyter lab --watch"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment