With this Vagrantfile, you will have a Vagrant VM with three NICs. Vagrant uses eth0 for NAT'ing the guest to the outside world. (I do not know a way to override this. Vagrant is very unhappy with eth0 being the NAT interface.) eth1 and eth2 will be on separate virtual subnets available only between the host and the guest.
This file contains 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
where_the_cool_packages_at = {} | |
where_the_cool_packages_at << { :package => "awesomeness.rpm", # this will be used as the downloaded filename | |
:url => "https://awesomesauce.example.com/download/this/awesomeness.rpm" # where to get it | |
} | |
where_the_cool_packages_at << { :package => "otherthing.rpm", | |
:url => "https://someotherthing.example.com/download/the/otherthing.rpm" | |
} | |
where_the_cool_packages_at.each do |package, url| | |
# download the thing from `url` and put it in Chef's file cache |
This file contains 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
require 'rspec' | |
class HiThere | |
def blarg | |
"hi there" | |
end | |
end | |
describe HiThere do | |
it 'says hi' do |
This file contains 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
# Packaging ruby with fpm is a bit meta | |
# You need ruby install to use fpm | |
# I used an RVM install on a VM install fpm in a packaging gemset | |
# Install EPEL if you don't have it already | |
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm | |
# Install deps for ruby build | |
yum install rpm-build readline-devel.x86_64 libffi-devel.x86_64 libyaml-devel.x86_64 zlib-devel.x86_64 openssl-devel.x86_64 |
This file contains 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
rubinius 1.2.4dev installed via RVM v1.6.5 on Ubuntu 10.10 | |
Installing pr_geohash (1.0.0) *** glibc detected *** /home/robb/.rvm/rubies/rbx-head/bin/rbx: free(): invalid next size (fast): 0x0b617120 *** | |
Rubinius Crash Report #rbxcrashreport | |
Error: signal SIGABRT | |
[[Backtrace]] | |
/home/robb/.rvm/rubies/rbx-head/bin/rbx[0x80acf2c] |
This file contains 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
» ruby -v | |
rubinius 2.0.0dev (1.8.7 4b04a866 yyyy-mm-dd JI) [i686-pc-linux-gnu] | |
» gem install bundler | |
Fetching: bundler-1.0.15.gem (100%) | |
Successfully installed bundler-1.0.15 | |
1 gem installed | |
Installing ri documentation for bundler-1.0.15... | |
Installing RDoc documentation for bundler-1.0.15... |
This file contains 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
def check_table_and_sequence_names | |
connection = ActiveRecord::Base.connection | |
if connection.adapter_name == "PostgreSQL" | |
table_names = connection.tables.keep_if { |t| t !~ /schema_migrations/ } | |
table_names.map { |t| [t, connection.pk_and_sequence_for(t)].flatten } | |
end | |
end | |
check_table_and_sequence_names | |
# => [["tablename", "primarykeyname", "sequencename"]] |
This file contains 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
testy=# CREATE SEQUENCE common_fruit_id_seq; | |
CREATE SEQUENCE | |
testy=# | |
testy=# CREATE TABLE apples ( | |
testy(# id INT4 DEFAULT nextval('common_fruit_id_seq') NOT NULL, | |
testy(# price NUMERIC | |
testy(# ); | |
CREATE TABLE | |
testy=# | |
testy=# CREATE TABLE oranges ( |
This file contains 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
#include <stdio.h> | |
#include <string> | |
#include <string.h> | |
int main() { | |
std::string str = "ab:cd:ef"; | |
const char *psz = str.c_str(); | |
for (;;) | |
{ |
This file contains 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
web [2013-02-12T17:35:11+00:00] INFO: *** Chef 10.20.0 *** | |
web [2013-02-12T17:35:11+00:00] INFO: [inet6] no default interface, picking the first ipaddress | |
web [2013-02-12T17:35:11+00:00] INFO: Client key /etc/chef/client.pem is not present - registering | |
web [2013-02-12T17:35:12+00:00] INFO: HTTP Request Returned 404 Not Found: Cannot load node web | |
web [2013-02-12T17:35:12+00:00] INFO: Setting the run_list to ["role[chef-client]"] from JSON | |
web | |
web ================================================================================ | |
web Error expanding the run_list: | |
web ================================================================================ | |
web |
OlderNewer