Skip to content

Instantly share code, notes, and snippets.

@jfgomez86
Created July 17, 2013 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfgomez86/6023900 to your computer and use it in GitHub Desktop.
Save jfgomez86/6023900 to your computer and use it in GitHub Desktop.
This is a basic setup for development productivity.
# My Projects shortcut function:
PROJECTS_DIR="/Users/me/Projects"
p() {
PROJECT_NAME="$1";
cd "$PROJECTS_DIR/$PROJECT_NAME";
}
_projects_list() {
reply=($(ls $PROJECTS_DIR))
}
compctl -K _projects_list p
compctl -K _projects_list launch
#!/bin/zsh
launch () {
project="$1"
/usr/bin/osascript ~/.console/apple_scripts/launch_project.scpt $project
}
on run argv
tell application "iTerm"
activate
tell current terminal
tell the last session
write text "p " & item 1 of argv
write text "guard"
end
launch session "Default"
tell the last session
write text "p " & item 1 of argv
end
launch session "Default"
tell the last session
write text "p " & item 1 of argv
write text "rails c"
end
launch session "Default"
tell the last session
write text "p " & item 1 of argv
end
launch session "Default"
tell the last session
write text "p " & item 1 of argv
write text "tail -f log/development.log"
end
select second session
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment