Skip to content

Instantly share code, notes, and snippets.

>>> str
'unprocessed/01-16-2017-15-32-16'
>>> idx = str.index("/")
>>> idx
11
>>> str[idx]
'/'
>>> str[idx+1]
'0'
>>> str[idx+2]
cluster_nodes = {
:master => {
:hostname => "pgmaster",
:ipaddress => "192.168.100.10",
},
:slave => {
:hostname => "pgslave",
:ipaddress => "192.168.100.11",
},
:control => {

Keybase proof

I hereby claim:

  • I am chris-sanders-dot-org on github.
  • I am cfsanders (https://keybase.io/cfsanders) on keybase.
  • I have a public key whose fingerprint is 9760 3B62 8970 1BEB A9DB 2BEF E2CE 7327 A729 D166

To claim this, I am signing this object:

@chris-sanders-dot-org
chris-sanders-dot-org / gist:38e330297dcf3f369110
Created July 22, 2014 15:54
corrected manual download / vagrant box add failure
➜ ISO vagrant box add --name opscode-centos-6.5 file:///Users/sanderch/Documents/ISO/opscode_centos-6.5_chef-provisionerless.box
INFO global: Vagrant version: 1.6.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant"
INFO global: VAGRANT_LOG="info"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
➜ ~ vagrant box add --name opscode-centos-6.5 https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
INFO global: Vagrant version: 1.6.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant"
INFO global: VAGRANT_LOG="info"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
@chris-sanders-dot-org
chris-sanders-dot-org / gist:b8c18338582ac612dc68
Last active August 29, 2015 14:04
vagrant add box (download)
➜ Downloads vagrant box add --name opscode-centos-6.5 https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
==> box: Adding box 'opscode-centos-6.5' (v0) for provider:
box: Downloading: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
➜ Downloads