Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
jedi4ever / gist:919605
Created April 14, 2011 14:38
adapted rvm-builder script for better os dependencies
vagrant@maverick:~/rvm-packaging$ cat package-ruby.sh
#!/bin/bash
wantruby=$1
if [ -z "$wantruby" ] ; then
echo "Usage: $0 <ruby>"
echo "Example: $0 jruby"
exit 1
fi
@jedi4ever
jedi4ever / building nodejs with fpm
Created April 14, 2011 14:43
build .deb for nodejs with fpm
rm node-v0.4.5.tar.gz
rm -rf node-v0.4.5
apt-get -y install wget
wget http://nodejs.org/dist/node-v0.4.5.tar.gz
tar -xzvf node-v0.4.5.tar.gz
cd node-v0.4.5
./configure --prefix=/usr
rm -rf /tmp/node-v0.4.5.$$
mkdir /tmp/node-v0.4.5.$$
make install DESTDIR=/tmp/node-v0.4.5.$$
@jedi4ever
jedi4ever / gist:941058
Created April 25, 2011 19:40
Create selfsigned cert in windows - vanilla commands
#run as administrator
#Create the certificate
http://www.jacco2.dds.nl/networking/certutil.html
[NewRequest]
Subject="CN=foo.example.com,C=GB"
KeyLength=2048
MachineKeySet=TRUE
@jedi4ever
jedi4ever / gist:944216
Created April 27, 2011 13:08
build .deb for redis via fpm
VERSION=2.2.5
apt-get -y install wget
rm -rf redis-$VERSION
wget http://redis.googlecode.com/files/redis-2.2.5.tar.gz -O redis-$VERSION.tar.gz
tar -xzvf redis-$VERSION.tar.gz
cd redis-$VERSION
./configure --prefix=/usr
make
rm -rf /tmp/redis-$VERSION.$$
mkdir /tmp/redis-$VERSION.$$
@jedi4ever
jedi4ever / gist:945817
Created April 28, 2011 04:44
snapshot vagrant
require 'vagrant'
env=Vagrant::Environment.new
env.vms[:admin].vm.name
505 VBoxManage snapshot villa-vagrant_1303902657 take sandbox
512 VBoxManage controlvm villa-vagrant_1303902657 poweroff
515 VBoxManage startvm villa-vagrant_1303902657
@jedi4ever
jedi4ever / gist:950798
Created May 1, 2011 19:41
first take on veewee - solaris express 11 install definition
Veewee::Session.declare({
:cpu_count => '1', :memory_size=> '768',
#Disk size needs to be 12Gig +
:disk_size => '15140', :disk_format => 'VDI', :hostiocache => 'off', :use_hw_virt_ext => 'on',
:os_type_id => 'OpenSolaris',
:iso_file => "sol-11-exp-201011-ai-x86.iso",
:iso_src => "",
:iso_md5 => "36527d4d49a645ef6f6d2677c8e0118c",
:iso_download_timeout => 1000,
:boot_wait => "10", :boot_cmd_sequence => [
@jedi4ever
jedi4ever / gist:952098
Created May 2, 2011 18:29
veewee postinstall - solaris 11 - opencsw
# http://projects.puppetlabs.com/projects/1/wiki/Puppet_Solaris
# Add the opencsw package site
export PATH=/usr/bin/:/usr/sbin:$PATH
yes|/usr/sbin/pkgadd -d http://mirror.opencsw.org/opencsw/pkgutil-`uname -p`.pkg all
/opt/csw/bin/pkgutil -U
# We need some header stuff and so on to get gcc going
@jedi4ever
jedi4ever / solaris ai manifest - default.xml
Created May 3, 2011 07:51
solaris 11 - express - i386 - ruby - gcc - chef - puppet - virtualbox - vagrant
falcon-pdb:veewee patrick$ vagrant basebox build mysolaris --force
Verifying the isofile sol-11-exp-201011-ai-x86.iso is ok.
Forcing build by destroying mysolaris machine
VBoxManage unregistervm 'mysolaris' --delete
Deleting vm mysolaris
Creating vm mysolaris : 768M - 1 CPU - OpenSolaris
Creating new harddrive of size 15140
VBoxManage createhd --filename '/Users/patrick/VirtualBox VMs/mysolaris/mysolaris.vdi' --size '15140' --format vdi > /dev/null
Attaching disk: /Users/patrick/VirtualBox VMs/mysolaris/mysolaris.vdi
@jedi4ever
jedi4ever / gist:955604
Created May 4, 2011 17:19
create AMI from instance with fog
>> aws_provider=Fog::Compute.new({ :region => "eu-west-1", :provider => "AWS"})
-> instance (running) = i-c1ac2bb7
>> ami=aws_provider.create_image("i-c1ac2bb7","name","description")
If not yet finished you might see
/Users/patrick/.rvm/gems/ruby-1.8.7-p330@mccloud/gems/excon-0.6.2/lib/excon/connection.rb:178:in `request':
InvalidAMIID.Unavailable => AMI 'ami-796d5b0d' is pending, and cannot be run (Fog::Service::Error)
@jedi4ever
jedi4ever / gemspec file
Created May 15, 2011 18:34
Patch to take mcollective gitcode and turn it into a gem for mcollective-client
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = "mcollective-client"
s.version = "1.0.2"
s.platform = Gem::Platform::RUBY
s.authors = ["RI Pienaar"]
s.email = ["ripienaar@puppetlabs.com"]
s.homepage = "https://github.com/puppetlabs/marionette-collective"
s.summary = %q{Mcollective client}
s.description = %q{Interact with mcollective}