Skip to content

Instantly share code, notes, and snippets.

View larsks's full-sized avatar

Lars Kellogg-Stedman larsks

View GitHub Profile
class network::remove_hwaddr {
augeas { 'remove_hwaddr':
context => '/files/etc/sysconfig/network-scripts/*[DEVICE]',
changes => [
'rm HWADDR',
],
}
}
@larsks
larsks / gist:1122652
Created August 3, 2011 13:39
puppet scope
# An example for a comment at http://www.ryanuber.com/global-definitions-and-relative-scope-in-puppet.html
#
# Because the "httpd" class sets defaults for file resources, and because it includes "some_other_class",
# the file /tmp/this_is_a_test will be created with owner=apache and group=apache.
class "some_other_class" {
file {'/tmp/this_is_a_test': ensure => file }
}
class "httpd"
#!/bin/sh
lsof | grep lmgrd | awk '$5 == "sock" {files[$2]++; names[$2]=$1} END {for (f in files) { printf "%20s %10s %s\n", names[f], f, files[f]}}'
#!/usr/bin/python
import os
import sys
import zmq
def main():
args = sys.argv[1:]
node default {
include core
include vim
include git
include irssi
}
node default {
include core
include vim
include git
include irssi
}
@larsks
larsks / gist:1309304
Created October 24, 2011 15:21
Sample gist
This is some example content I am using as a demonstration. It's not very exciting.
<domain type='lxc' id='25097'>
<name>vm1</name>
<uuid>d0c38655-4001-f021-9589-4e5282fa87f6</uuid>
<memory>500000</memory>
<currentMemory>500000</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64'>exe</type>
<init>/bin/bash</init>
</os>
From 199beb26a64a12cf02a76e28654c2a939771408d Mon Sep 17 00:00:00 2001
From: Lars Kellogg-Stedman <lars@oddbit.com>
Date: Fri, 28 Oct 2011 15:33:22 -0400
Subject: [PATCH] prefer local TransformSet directive to parent
---
src/mod_transform.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mod_transform.c b/src/mod_transform.c
@larsks
larsks / gist:1522644
Created December 27, 2011 03:37
ratelimit crashpln
#!/bin/sh
# The network device used for backups
dev=p10p1
# The remove address of the CrashPlanserver
crashplan_addr=50.93.0.0/16
# The port
crashplan_port=443