Skip to content

Instantly share code, notes, and snippets.

1:09 PM
echo '{"ssl": { "verify": false }}' > ~/.berkshelf/config.json
@sbates
sbates / gist:6224977
Created August 13, 2013 19:51
I commented "Defaults requiretty" from the sudoers file and instead of giving me connection refused I now get this.
DEBUG ssh: == Net-SSH connection debug-level log END ==
INFO ssh: SSH not up: #<Vagrant::Errors::SSHAuthenticationFailed: SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.>
@sbates
sbates / gist:6106963
Last active December 20, 2015 09:19
wtf hyatt and gold passport

me:
I have been trying to request a missing stay credit for June 17-23 at the Santa Clara Hyatt Regency. Can you help me find out the status of this? I also need the invoice for expense reporting.

Hyatt email reply:
Unfortunately, the stay you have requested missing credit for was unable to be located. You may still receive points for all eligible incidental charges while you were our guest, but we will need a copy of the folio from your stay be sent to our office. I do apologize for any potential inconvenience this may create for you. We can be reached at goldpassport@hyatt.com.

Me:
So I have to request a copy of my bill from one part of your organization in order to prove to another part of the same company that I stayed there? This is hilarious.

@sbates
sbates / gist:5985245
Last active December 19, 2015 16:38
esl-erlang still not providing erlang
[root@tomcatty-berkshelf yum.repos.d]# yum install esl-erlang-R15B03
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: centos.hostingxtreme.com
* extras: mirror.fdcservers.net
* rpmforge: mirror.rit.edu
* updates: mirror.ubiquityservers.com
Setting up Install Process
Package esl-erlang-R15B03-2.x86_64 already installed and latest version
Nothing to do
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.hostname = "monitor-berkshelf"
config.omnibus.chef_version = :latest
bash "update_ssh" do
code <<-EOH
sed -i -e 's/AuthorizedKeysFile.*authorized_keys/AuthorizedKeysFile \\/\\.keys\\/%u\\/authorized_keys/g' /etc/ssh/sshd_config
EOH
end
@sbates
sbates / gist:5723633
Created June 6, 2013 18:10
sad erlang
[vagrant@monitor-berkshelf ~]$ sudo rpm -U /tmp/vagrant-chef-1/rabbitmq-server-3.0.4-1.noarch.rpm
warning: /tmp/vagrant-chef-1/rabbitmq-server-3.0.4-1.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 056e8e56: NOKEY
error: Failed dependencies:
erlang >= R12B-3 is needed by rabbitmq-server-3.0.4-1.noarch
[vagrant@monitor-berkshelf ~]$ rpm -qa|grep erlang
esl-erlang-R15B03-2.x86_64
|ruby-1.9.3-p392| macncheese in ~/github/berkshelf
± |master ✓| → bundle exec berks ver
******************
Berkshelf (2.0.0.beta)
******************
Copyright 2012-2013 Riot Games
Jamie Winsor (<reset@riotgames.com>)
Josiah Kiehl (<jkiehl@riotgames.com>)
if (new_resource.use_host_dns)
lxc_fstab "resolv[#{new_resource.name}]" do
container new_resource.name
file_system '/etc/resolv.conf'
mount_point '/etc/resolv.conf'
type 'none'
options 'bind'
end
end
@sbates
sbates / gist:5694606
Created June 2, 2013 19:29
where's the monitor recipe?
vagrant@sensu-lxc-host:/vagrant$ bin/vagabond knife search node "chef_environment:_default AND recipes:monitor\\:\\:master"
ERROR: ArgumentError: Type must be a string or a symbol!
vagrant@sensu-lxc-host:/vagrant$ bin/vagabond knife search node "recipes:monitor\\:\\:master"
ERROR: knife search failed: invalid search query: 'recipes:monitor::master'
vagrant@sensu-lxc-host:/vagrant$ bin/vagabond knife search node "recipes:monitor::master"
ERROR: knife search failed: invalid search query: 'recipes:monitor::master'
vagrant@sensu-lxc-host:/vagrant$ bin/vagabond knife search node "recipes:monitor\:\:master"
ERROR: knife search failed: invalid search query: 'recipes:monitor::master'
vagrant@sensu-lxc-host:/vagrant$ bin/vagabond knife search node "Recipes:monitor\:\:master"
ERROR: knife search failed: invalid search query: 'Recipes:monitor::master'