Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: dougm/dotfiles
base: 4dae8b9228
...
head fork: dougm/dotfiles
compare: abf591b757
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 13, 2012
@dougm dircolors-solarized af57b50
@dougm Update BOSH plugin
- rvc 1.7.0 support

- Micro BOSH support

- bosh-release support (drops chef_deployer support)

- rvc launcher
abf591b
Showing with 310 additions and 92 deletions.
  1. +231 −73 home/.dircolors
  2. +28 −0 home/.rvc/README.md
  3. +51 −19 home/.rvc/bosh.rb
View
304 home/.dircolors
@@ -1,14 +1,17 @@
-# Configuration file for dircolors, a utility to help you set the
-# LS_COLORS environment variable used by GNU ls with the --color option.
-# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
-# slackware version of dircolors) are recognized but ignored.
+# Dark 256 color solarized theme for the color GNU ls utility.
+# Used and tested with dircolors (GNU coreutils) 8.5
+#
+# @author {@link http://sebastian.tramp.name Sebastian Tramp}
+# @license http://sam.zoy.org/wtfpl/ Do What The Fuck You Want To Public License (WTFPL)
+#
+# More Information at
+# https://github.com/seebi/dircolors-solarized
-# Below, there should be one TERM entry for each termtype that is colorizable
-TERM linux
-TERM linux-c
-TERM mach-color
-TERM console
+# Term Section
+TERM Eterm
+TERM ansi
+TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
@@ -19,14 +22,46 @@ TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
-TERM xterm
-TERM xterm-color
-TERM xterm-debian
+TERM cons25
+TERM console
+TERM cygwin
+TERM dtterm
+TERM eterm-color
+TERM gnome
+TERM gnome-256color
+TERM jfbterm
+TERM konsole
+TERM kterm
+TERM linux
+TERM linux-c
+TERM mach-color
+TERM mlterm
+TERM putty
TERM rxvt
+TERM rxvt-256color
+TERM rxvt-cygwin
+TERM rxvt-cygwin-native
+TERM rxvt-unicode
+TERM rxvt-unicode256
+TERM rxvt-unicode-256color
TERM screen
+TERM screen-256color
+TERM screen-256color-bce
+TERM screen-bce
TERM screen-w
+TERM screen.linux
TERM vt100
+TERM xterm
+TERM xterm-16color
+TERM xterm-256color
+TERM xterm-88color
+TERM xterm-color
+TERM xterm-debian
+## Documentation
+#
+# standard colors
+#
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
@@ -35,71 +70,194 @@ TERM vt100
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
-NORMAL 00 # global default, although everything should be something.
-FILE 00 # normal file
-DIR 01;36 # directory
-LINK 01;37 # symbolic link. (If you set this to 'target' instead of a
- # numerical value, the color is as for the file pointed to.)
-FIFO 40;33 # pipe
-SOCK 01;35 # socket
-DOOR 01;35 # door
-BLK 40;33;01 # block device driver
-CHR 40;33;01 # character device driver
-ORPHAN 40;31;01 # symlink to nonexistent file
+#
+#
+# 256 color support
+# see here: http://www.mail-archive.com/bug-coreutils@gnu.org/msg11030.html)
+#
+# Text 256 color coding:
+# 38;5;COLOR_NUMBER
+# Background 256 color coding:
+# 48;5;COLOR_NUMBER
+## Special files
+
+NORMAL 00;38;5;244 # no color code at all
+#FILE 00 # regular file: use no color at all
+RESET 0 # reset to "normal" color
+DIR 00;38;5;33 # directory 01;34
+LINK 01;38;5;37 # symbolic link. (If you set this to 'target' instead of a
+ # numerical value, the color is as for the file pointed to.)
+# MULTIHARDLINK 00 # regular file with more than one link
+FIFO 48;5;230;38;5;136;01 # pipe
+SOCK 48;5;230;38;5;136;01 # socket
+DOOR 48;5;230;38;5;136;01 # door
+BLK 48;5;230;38;5;244;01 # block device driver
+CHR 48;5;230;38;5;244;01 # character device driver
+ORPHAN 48;5;235;38;5;160 # symlink to nonexistent file, or non-stat'able file
+SETUID 48;5;160;38;5;230 # file that is setuid (u+s)
+SETGID 48;5;136;38;5;230 # file that is setgid (g+s)
+CAPABILITY 30;41 # file with capability
+STICKY_OTHER_WRITABLE 48;5;64;38;5;230 # dir that is sticky and other-writable (+t,o+w)
+OTHER_WRITABLE 48;5;235;38;5;33 # dir that is other-writable (o+w) and not sticky
+STICKY 48;5;33;38;5;230 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
-EXEC 01;35
+EXEC 01;38;5;64
+
+## Archives or compressed (violet + bold for compression)
+.tar 00;38;5;61
+.tgz 01;38;5;61
+.arj 01;38;5;61
+.taz 01;38;5;61
+.lzh 01;38;5;61
+.lzma 01;38;5;61
+.tlz 01;38;5;61
+.txz 01;38;5;61
+.zip 01;38;5;61
+.z 01;38;5;61
+.Z 01;38;5;61
+.dz 01;38;5;61
+.gz 01;38;5;61
+.lz 01;38;5;61
+.xz 01;38;5;61
+.bz2 01;38;5;61
+.bz 01;38;5;61
+.tbz 01;38;5;61
+.tbz2 01;38;5;61
+.tz 01;38;5;61
+.deb 01;38;5;61
+.rpm 01;38;5;61
+.jar 01;38;5;61
+.rar 01;38;5;61
+.ace 01;38;5;61
+.zoo 01;38;5;61
+.cpio 01;38;5;61
+.7z 01;38;5;61
+.rz 01;38;5;61
+.apk 01;38;5;61
+
+# Image formats (yellow)
+.jpg 00;38;5;136
+.JPG 00;38;5;136 #stupid but needed
+.jpeg 00;38;5;136
+.gif 00;38;5;136
+.bmp 00;38;5;136
+.pbm 00;38;5;136
+.pgm 00;38;5;136
+.ppm 00;38;5;136
+.tga 00;38;5;136
+.xbm 00;38;5;136
+.xpm 00;38;5;136
+.tif 00;38;5;136
+.tiff 00;38;5;136
+.png 00;38;5;136
+.svg 00;38;5;136
+.svgz 00;38;5;136
+.mng 00;38;5;136
+.pcx 00;38;5;136
+.dl 00;38;5;136
+.xcf 00;38;5;136
+.xwd 00;38;5;136
+.yuv 00;38;5;136
+.cgm 00;38;5;136
+.emf 00;38;5;136
+.eps 00;38;5;136
+.CR2 00;38;5;136
+.ico 00;38;5;136
+
+# Files of special interest (base1 + bold)
+.tex 01;38;5;245
+.rdf 01;38;5;245
+.owl 01;38;5;245
+.n3 01;38;5;245
+.ttl 01;38;5;245
+.nt 01;38;5;245
+.torrent 01;38;5;245
+.xml 01;38;5;245
+*Makefile 01;38;5;245
+*Rakefile 01;38;5;245
+*build.xml 01;38;5;245
+*rc 01;38;5;245
+*1 01;38;5;245
+.nfo 01;38;5;245
+*README 01;38;5;245
+*README.txt 01;38;5;245
+*readme.txt 01;38;5;245
+.md 01;38;5;245
+*README.markdown 01;38;5;245
+.ini 01;38;5;245
+.yml 01;38;5;245
+.cfg 01;38;5;245
+.conf 01;38;5;245
+.c 01;38;5;245
+.cpp 01;38;5;245
+.cc 01;38;5;245
-# List any file extensions like '.gz' or '.tar' that you would like ls
-# to colorize below. Put the extension, a space, and the color init string.
-# (and any comments you want to add after a '#')
+# "unimportant" files as logs and backups (base01)
+.log 00;38;5;240
+.bak 00;38;5;240
+.aux 00;38;5;240
+.bbl 00;38;5;240
+.blg 00;38;5;240
+*~ 00;38;5;240
+*# 00;38;5;240
+.part 00;38;5;240
+.incomplete 00;38;5;240
+.swp 00;38;5;240
+.tmp 00;38;5;240
+.temp 00;38;5;240
+.o 00;38;5;240
+.pyc 00;38;5;240
+.class 00;38;5;240
+.cache 00;38;5;240
-# If you use DOS-style suffixes, you may want to uncomment the following:
-#.cmd 01;32 # executables (bright green)
-#.exe 01;32
-#.com 01;32
-#.btm 01;32
-#.bat 01;32
+# Audio formats (orange)
+.aac 00;38;5;166
+.au 00;38;5;166
+.flac 00;38;5;166
+.mid 00;38;5;166
+.midi 00;38;5;166
+.mka 00;38;5;166
+.mp3 00;38;5;166
+.mpc 00;38;5;166
+.ogg 00;38;5;166
+.ra 00;38;5;166
+.wav 00;38;5;166
+.m4a 00;38;5;166
+# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
+.axa 00;38;5;166
+.oga 00;38;5;166
+.spx 00;38;5;166
+.xspf 00;38;5;166
-.tar 01;31 # archives or compressed (bright red)
-.tgz 01;31
-.arj 01;31
-.taz 01;31
-.lzh 01;31
-.zip 01;31
-.z 01;31
-.Z 01;31
-.gz 01;31
-.bz2 01;31
-.deb 01;31
-.rpm 01;31
-.jar 01;31
-.dmg 01;31
+# Video formats (as audio + bold)
+.mov 01;38;5;166
+.mpg 01;38;5;166
+.mpeg 01;38;5;166
+.m2v 01;38;5;166
+.mkv 01;38;5;166
+.ogm 01;38;5;166
+.mp4 01;38;5;166
+.m4v 01;38;5;166
+.mp4v 01;38;5;166
+.vob 01;38;5;166
+.qt 01;38;5;166
+.nuv 01;38;5;166
+.wmv 01;38;5;166
+.asf 01;38;5;166
+.rm 01;38;5;166
+.rmvb 01;38;5;166
+.flc 01;38;5;166
+.avi 01;38;5;166
+.fli 01;38;5;166
+.flv 01;38;5;166
+.gl 01;38;5;166
+.m2ts 01;38;5;166
+.divx 01;38;5;166
+# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
+.axv 01;38;5;166
+.anx 01;38;5;166
+.ogv 01;38;5;166
+.ogx 01;38;5;166
-# image formats
-.jpg 01;35
-.png 01;35
-.gif 01;35
-.bmp 01;35
-.ppm 01;35
-.tga 01;35
-.xbm 01;35
-.xpm 01;35
-.tif 01;35
-.png 01;35
-.mpg 01;35
-.avi 01;35
-.fli 01;35
-.gl 01;35
-.dl 01;35
-# source code files
-.pl 00;33
-.PL 00;33
-.pm 00;33
-.tt 00;33
-.yml 00;33
-.sql 00;33
-.html 00;33
-.css 00;33
-.js 00;33
View
28 home/.rvc/README.md
@@ -0,0 +1,28 @@
+# RVC plugins
+
+Plugins for [Ruby vSphere Client](https://github.com/vmware/rvc)
+
+## bosh.vcenter
+
+Connect to vCenter instances by [BOSH](https://github.com/cloudfoundry/bosh) deployment name.
+
+This plugin command uses vCenter properties from both BOSH and Micro BOSH
+[deployment manifests](https://github.com/cloudfoundry/oss-docs/tree/master/bosh)
+to connect to vCenter via RVC. The bosh.vcenter command will connect to vCenter
+and cd to datacenter/cluster/pool/vms.
+
+Example:
+
+ > bosh.vcenter dev179
+ /cf-dev179.x.x.x/LAS01/computers/CLUSTER14/resourcePool/pools/Dev179/vms> ls
+ 0 sc-dff4843d-9077-47f5-bab7-6d94c1b9d657: poweredOff
+ ...
+ 8 vm-4ec48ee1-acb8-4997-a857-e8d9c33786c8: poweredOn
+ 9 vm-dac12047-094b-486c-b61e-ee10a1e1d453: poweredOn
+ 10 vm-3c3e9be8-34a8-497c-a812-dac0c6f77988: poweredOn
+ ...
+
+The plugin can also be used to start RVC itself with vCenter connection using a
+BOSH deployment name. Example:
+
+ $ ruby ~/.rvc/bosh.rb dev179
View
70 home/.rvc/bosh.rb
@@ -1,28 +1,60 @@
+require "yaml"
require "resolv"
-opts :vcenter do
- summary "Connect to bosh vCenter"
- arg :name, "bosh instance name"
-end
+def vcenter_config name
+ deployments = ENV["CF_DEPLOYMENTS"] || "#{ENV["HOME"]}/cf/deployments"
-def vcenter name
- deployments = ENV['CF_DEPLOYMENTS'] || "#{ENV['HOME']}/cf/deployments"
- yml = ["micro_bosh.yml", "cloud/assets/director/director.yml.erb"].map {|f|
+ yml = ["bosh.yml", "micro_bosh.yml"].map {|f|
File.join(deployments, name, f)
}.select {|path| File.exists?(path)}.first
- config = YAML.load(File.read(yml))['cloud']['properties']['vcenters'].first
- begin
- host = Resolv.new.getname(config['host'])
- rescue
- host = config['host']
+
+ config = YAML.load(File.read(yml))
+
+ if File.basename(yml) == "bosh.yml"
+ config = config["properties"]["vcenter"]
+ else
+ config = config["cloud"]["properties"]["vcenters"].first
end
- dc = config['datacenters'].first
+
+ ENV["RBVMOMI_PASSWORD"] = config["password"]
+ ENV["RBVMOMI_USER"] = config["user"]
+
+ config
+end
+
+def vcenter_host config
+ address = config["address"] || config["host"]
+ Resolv.new.getname(address)
+rescue
+ address
+end
+
+def vcenter name
+ config = vcenter_config(name)
+ host = vcenter_host(config)
+
unless $shell.connections[host]
- ENV['RBVMOMI_PASSWORD'] = config['password']
- CMD.vim.connect "#{config['user']}@#{host}", {}
+ $shell.cmds.vim.connect host, {}
+ end
+
+ dc = config["datacenters"].first
+ cluster = dc["clusters"].first
+ cluster_name = cluster.keys.first
+ cluster_path = File.join("", host, dc["name"], "computers", cluster_name)
+ if pool = cluster[cluster_name]["resource_pool"]
+ cluster_path = File.join(cluster_path, "resourcePool", "pools", pool, "vms")
+ end
+
+ $shell.cmds.basic.cd $shell.fs.lookup_single(cluster_path)
+end
+
+if __FILE__ == $0
+ config = vcenter_config(ARGV[0])
+
+ exec "rvc", vcenter_host(config)
+else
+ opts :vcenter do
+ summary "Connect to bosh vCenter"
+ arg :name, "bosh instance name"
end
- cluster_path = File.join("", host, dc['name'], "computers", dc['clusters'].first)
- CMD.basic.cd RVC::Util.lookup_single(cluster_path)
-ensure
- ENV['RBVMOMI_PASSWORD'] = nil
end

No commit comments for this range

Something went wrong with that request. Please try again.