Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
jedi4ever / gist:838373
Created February 22, 2011 08:29
Bootstrap Freebsd with veewee
#http://www.freebsd.org/doc/en_US.ISO8859-1/articles/remote-install/installation.html
dd if=/dev/zero of=/dev/ad4 count=2
#bsdlabel -w -B /dev/ad4
sysctl kern.geom.debugflags=16
#http://forum.nginx.org/read.php?23,146311,146451
# Init the disk with an MBR
gpart create -s mbr ad4
# Create a BSD container
@jedi4ever
jedi4ever / apt_default.rb
Created March 2, 2011 13:23
Adapted chef apt default recipe
# Adapted because otherwise it will do an update everytime
#http://blog.kumina.nl/2010/11/puppet-tipstricks-running-apt-get-update-only-when-needed/
#
# Cookbook Name:: apt
# Recipe:: default
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@jedi4ever
jedi4ever / gist:861463
Created March 9, 2011 00:51
veewee install transcript json / cucumber
falcon-pdb:~ patrick$ cd v/
===============================================================
= NOTICE: =
===============================================================
= RVM has encountered a not yet trusted .rvmrc file in the =
= current working directory which may contain nasty code. =
= =
= Examine the contents of this file to be sure the contents =
= are good before trusting it! =
@jedi4ever
jedi4ever / dpkg-gnutar
Created March 17, 2011 08:41
homebrew formula to get dpkg working a mac
require 'formula'
class Tar <Formula
url 'http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz'
homepage 'http://www.gnu.org/software/tar/'
md5 '00d1e769c6af702c542cca54b728920d'
# depends_on 'cmake'
def install
@jedi4ever
jedi4ever / rakelogger.rb
Created March 17, 2011 12:15
could not find a good example on the new rake integration + integrated logging It's ugly but working
class RakeLogger < Vagrant::UI
def initialize(env,logger)
super(env)
@logger = logger
end
[[:warn, :yellow], [:error, :red], [:info, nil], [:confirm, :green]].each do |method, color|
class_eval <<-CODE
def #{method}(message, opts=nil)
@logger.warn("\#{line_reset}\#{format_message(message, opts)}")
@jedi4ever
jedi4ever / gist:882912
Created March 23, 2011 10:29
blueprint out of memory
Amazon
#ID = "ami-cef405a7" = x64 Ubuntu 10.10
:image_id => 'ami-cef405a7', :flavor_id => 't1.micro',
# [blueprint] searching for PEAR/PECL packages
# [blueprint] searching for Python packages
# [blueprint] searching for Ruby gems
# [blueprint] searching for configuration files
# [blueprint] searching for software built from source
# [blueprint] searching for apt packages
@jedi4ever
jedi4ever / gist:903711
Created April 5, 2011 14:36
Homebrew formula for rpmbuild
# Get nss formula
cd /usr/local/Library/Formula/
wget https://github.com/mbrunthaler/homebrew/raw/aa99a2c340bc81f3cb63fb14f35f7f3cc850769d/Library/Formula/nss.rb nss.rb
brew install libmagic
brew install nss (zie gist)
brew install popt
brew install nspr
brew install berkeley-db
brew install lua
@jedi4ever
jedi4ever / gist:906286
Created April 6, 2011 19:02
AMI key/value attributes - Ubuntu
>> AWS.images.get("ami-cef405a7")
<Fog::AWS::Compute::Image
id="ami-cef405a7",
architecture="x86_64",
block_device_mapping=[{"snapshotId"=>"snap-e3f1218e", "deviceName"=>"/dev/sda1", "deleteOnTermination"=>"true", "volumeSize"=>8}],
description=nil,
location="099720109477/ebs/ubuntu-images/ubuntu-maverick-10.10-amd64-server-20101225",
owner_id="099720109477",
state="available",
type="machine",
@jedi4ever
jedi4ever / gist:909825
Created April 8, 2011 13:26
Mccloud v0.11 - Vagrant for the cloud - Transcript
falcon-pdb patrick$ mkdir mccloud-test
falcon-pdb patrick$ cd mccloud-test
falcon-pdb:mccloud-test patrick$ gem install mccloud
Fetching: net-ssh-2.1.4.gem (100%)
Fetching: net-scp-1.0.4.gem (100%)
Fetching: builder-3.0.0.gem (100%)
Fetching: excon-0.6.1.gem (100%)
Fetching: formatador-0.1.3.gem (100%)
Fetching: json-1.5.1.gem (100%)
mcclouddevelopmentpatrickmcollectivestack - ROLLBACK_COMPLETE
-- Timestamp: Wed Apr 13 13:23:14 UTC 2011
-- LogicalResourceId: mcclouddevelopmentpatrickmcollectivestack
-- ResourceType: AWS::CloudFormation::Stack
-- ResourceStatus: ROLLBACK_COMPLETE
--
-- Timestamp: Wed Apr 13 13:23:11 UTC 2011
-- LogicalResourceId: ActiveMQSecurityGroup
-- ResourceType: AWS::EC2::SecurityGroup
-- ResourceStatus: DELETE_COMPLETE