Skip to content

Instantly share code, notes, and snippets.

@evenstensberg
Last active January 7, 2018 20:15
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 evenstensberg/b73cfc36b4b0e1c5b657f19b8affc353 to your computer and use it in GitHub Desktop.
Save evenstensberg/b73cfc36b4b0e1c5b657f19b8affc353 to your computer and use it in GitHub Desktop.
Start your day right

Work

This script helps you start your development by opening your project in vscode, its github repository and optionally slack.

Usage

work react

Installation

  1. Navigate to usr/local/bin in terminal
  2. Create the file: touch work
  3. Open the file: open work
  4. Paste in the code at the end of the gist
  5. Now do chmod +x work
  6. You're done!

If you want to launch slack after starting up, simply run work myProject slack

workdir=$(mdfind -literal "kMDItemDisplayName == $1" |  grep -v "node_modules")
code -n $workdir
cd $workdir
url="https://github.$(git config remote.origin.url | cut -f2 -d.)"
open /Applications/Google\ Chrome.app $url 

if [ $2 -a $2  = "slack" ]
then
open /Applications/Slack.app
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment