Created
November 15, 2012 19:33
-
-
Save mccutchen/4080698 to your computer and use it in GitHub Desktop.
Hacky remote editor setup for bitly VMs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
app=$1 | |
shift; | |
open -a $app $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cmd=$1 | |
shift; | |
$cmd $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ssh [email protected]"~/bin/remote_app $*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ssh [email protected] "~/bin/remote_cmd $*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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