Skip to content

Instantly share code, notes, and snippets.

@mccutchen
Created November 15, 2012 19:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mccutchen/4080698 to your computer and use it in GitHub Desktop.
Save mccutchen/4080698 to your computer and use it in GitHub Desktop.
Hacky remote editor setup for bitly VMs
#!/bin/sh
app=$1
shift;
open -a $app $@
#!/bin/sh
cmd=$1
shift;
$cmd $@
#!/bin/sh
for dir in $@; do
if [ -e $dir ]; then
DIRS="$DIRS $(readlink -f $dir)"
else
ARGS="$ARGS $dir"
fi
shift;
done
remote_app "TextMate" "$DIRS"
#!/bin/sh
ssh mccutchen@brisket.local"~/bin/remote_app $*"
#!/bin/sh
ssh mccutchen@brisket.local "~/bin/remote_cmd $*"
#!/bin/sh
for dir in $@; do
if [ -e $dir ]; then
DIRS="$DIRS $(readlink -f $dir)"
else
ARGS="$ARGS $dir"
fi
shift;
done
remote_cmd /Users/mccutchen/bin/subl -n "$DIRS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment