Last active
March 31, 2017 23:27
-
-
Save treyd/92f57d04c9965eca545460a2345a85cf to your computer and use it in GitHub Desktop.
Revisions
-
treyd revised this gist
Mar 31, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,8 @@ if [[ "$@" =~ ss-platform ]]; then elif [[ "$@" =~ ss-support ]]; then set_term_bgcolor 0 40 0 # add more host defs here. can be hostnames or ~/.ssh/config entries # # include the following if you want to highlight *any* ssh session else set_term_bgcolor 0 0 20 fi -
treyd revised this gist
Mar 31, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,8 @@ if [[ "$@" =~ ss-platform ]]; then elif [[ "$@" =~ ss-support ]]; then set_term_bgcolor 0 40 0 # add more host defs here. can be hostnames or ~/.ssh/config entries else set_term_bgcolor 0 0 20 fi ssh $@ -
treyd revised this gist
Mar 31, 2017 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,9 +4,7 @@ # (2) set: alias ssh=~/bin/ssh-colorize # (3) do: chmod +x ~/bin/ssh-colorize # # Forkd from https://gist.github.com/thomd/956095 set_term_bgcolor(){ local R=$1 @@ -27,7 +25,7 @@ if [[ "$@" =~ ss-platform ]]; then set_term_bgcolor 40 0 0 elif [[ "$@" =~ ss-support ]]; then set_term_bgcolor 0 40 0 # add more host defs here. can be hostnames or ~/.ssh/config entries fi ssh $@ -
treyd renamed this gist
Mar 31, 2017 . 1 changed file with 7 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,8 @@ #!/bin/bash # # (1) copy to: ~/bin/ssh-colorize # (2) set: alias ssh=~/bin/ssh-colorize # (3) do: chmod +x ~/bin/ssh-colorize # # Inspired from http://talkfast.org/2011/01/10/ssh-host-color # Fork from https://gist.github.com/773849 @@ -13,7 +14,7 @@ set_term_bgcolor(){ local B=$3 /usr/bin/osascript <<EOF tell application "iTerm" tell the current window tell the current session set background color to {$(($R*65535/255)), $(($G*65535/255)), $(($B*65535/255))} end tell @@ -22,10 +23,11 @@ end tell EOF } if [[ "$@" =~ ss-platform ]]; then set_term_bgcolor 40 0 0 elif [[ "$@" =~ ss-support ]]; then set_term_bgcolor 0 40 0 # add more host defs here fi ssh $@ -
thomd revised this gist
May 4, 2011 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,9 @@ # (1) copy to: ~/bin/ssh-host-color # (2) set: alias ssh=~/bin/ssh-host-color # # Inspired from http://talkfast.org/2011/01/10/ssh-host-color # Fork from https://gist.github.com/773849 # set_term_bgcolor(){ local R=$1 -
thomd renamed this gist
May 4, 2011 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ #!/bin/bash # # (1) copy to: ~/bin/ssh-host-color # (2) set: alias ssh=~/bin/ssh-host-color # set_term_bgcolor(){ -
thomd revised this gist
May 4, 2011 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ #!/bin/bash # # alias ssh=/some/bin/ssh-host-color # set_term_bgcolor(){ local R=$1 @@ -15,15 +18,12 @@ end tell EOF } if [[ "$@" =~ thomd ]]; then set_term_bgcolor 40 0 0 elif [[ "$@" =~ git ]]; then set_term_bgcolor 0 40 0 fi ssh $@ set_term_bgcolor 0 0 0 -
pol revised this gist
Jan 11, 2011 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,8 +21,9 @@ if [[ "$@" =~ production.server ]]; then set_term_bgcolor 20 0 0 elif [[ "$@" =~ staging.server ]]; then set_term_bgcolor 0 20 0 fi ssh $@ set_term_bgcolor 0 0 0 -
pol revised this gist
Jan 11, 2011 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,10 +17,12 @@ EOF # if [[ "$@" =~ production.server ]]; then set_term_bgcolor 20 0 0 elif [[ "$@" =~ staging.server ]]; then set_term_bgcolor 0 20 0 else set_term_bgcolor 0 0 0 fi ssh $@ -
pol created this gist
Jan 11, 2011 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/usr/local/bin/bash set_term_bgcolor(){ local R=$1 local G=$2 local B=$3 /usr/bin/osascript <<EOF tell application "iTerm" tell the current terminal tell the current session set background color to {$(($R*65535/255)), $(($G*65535/255)), $(($B*65535/255))} end tell end tell end tell EOF } # if [[ $RAILS_ENV =~ production ]]; then set_term_bgcolor 20 0 0 elif [[ $RAILS_ENV =~ development ]]; then set_term_bgcolor 0 20 0 else set_term_bgcolor 0 0 0 fi