Skip to content

Instantly share code, notes, and snippets.

package {
"rubygems":
ensure => present;
"puppet-lint":
require => Package["rubygems"],
ensure => present,
provider => gem;
"rspec-expectations":
require => Package["rubygems"],
As an arch fanboy I am somewhat used to it breaking.
In keeping with this I have not spent much energy trying to prevent it from doing so. This is a quick run through of an error and the fix.
I have put a *bit* of effort into keeping my box stable(this is a server) so I added an
<pre>
IgnorePgk Linux
</pre>
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
@nibalizer
nibalizer / get ip over serial
Created May 1, 2012 11:10
/etc/ppp/options
# ln -s /etc/ppp/options /etc/ppp/peers/provider
# pon
ttyS1
lock
debug
ipcp-accept-local
ipcp-accept-remote
local
crtscts
10.0.234.2:10.0.234.1
@nibalizer
nibalizer / yaml
Created May 1, 2012 20:01
hiera y u no work
---
:hierarchy:
- common
:backends:
- yaml
:yaml:
:datadir: '/home/nibz/puppet-1/data'
@nibalizer
nibalizer / mkarchroot snip
Created May 8, 2012 10:35
bash thing i found
##
# usage : in_array( $needle, $haystack )
# return : 0 - found
# 1 - not found
##
in_array() {
local needle=$1; shift
local item
for item in "$@"; do
[[ $item = $needle ]] && return 0 # Found
lxc.utsname = foo
lxc.mount = $CONTAINER_FSTAB
lxc.rootfs = $CONTAINER_ROOTFS
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.hwaddr = d2:19:bd:0c:29:bc
lxc.network.ipv4 = 0.0.0.0
@nibalizer
nibalizer / mklxc.sh
Created May 12, 2012 11:49
LXC Script
#!/bin/bash
NAME=$1
echo Name of container is ${NAME}
MAC=$2
echo Part of mac is ${MAC}
IP=$3
echo Ip of container is ${IP}
@nibalizer
nibalizer / bloggin
Created May 18, 2012 13:20
Ganeti On Arch
Arch + Ganeti
As much as I am currently in love with LXC, FreeBSD can't be loaded in a container yet to my knowledge. However some people have worked out a chroot/emulation layer allowing the execution of non-native binaries (http://wiki.debian.org/QemuUserEmulation) which is pretty cool.
This has led me back to vitalization.
I chose to solve the general problem (http://xkcd.com/974/) because I am a nerd and because ganeti 2.5 has been rumoured to support LXC. Since Version 2.2.0 it looks like.
So I looked in the AUR where there is one package, and it is marked as outdated.
@nibalizer
nibalizer / bootstrap.sh
Created May 24, 2012 09:50
debian/ubuntu puppet bootstrap
echo "comfiguring apt"
gpg --recv-key 4BD6EC30
gpg --recv-key 4BD6EC30
gpg -a --export 4BD6EC30 | sudo apt-key add -
echo '# puppetlabs' >> /etc/apt/sources.list
echo 'deb http://apt.puppetlabs.com precise main' >> /etc/apt/sources.list
echo 'deb-src http://apt.puppetlabs.com precise main' >> /etc/apt/sources.list
echo "aptitude update && aptitude upgrade"
aptitude update && aptitude upgrade