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
#!/opt/local/bin/perl | |
use Data::Dumper; | |
use Net::Riak; | |
my $client = Net::Riak->new(host => 'http://127.0.0.1:8098'); | |
# set up a bucket containing two person/user records and store them | |
my $bucket_one = $client->bucket('ONE'); | |
my $ref1 = { |
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
admin1@puppetmaster> pcm checkout -d ~/puppet-policy | |
admin1@puppetmaster> cd ~/puppet-policy | |
admin1@puppetmaster> vim modules/sudo/manifests/init.pp | |
admin1@puppetmaster> pcm commit -m "Update sudo configuration." | |
admin1@puppetmaster> pcm sync | |
admin2@puppetmaster> pcm checkout -d ~/src/pp | |
admin2@puppetmaster> cd ~/src/pp | |
admin2@puppetmaster> pcm review | |
admin2@puppetmaster> pcm commit -m "Peer review changes." |
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
#!/bin/bash | |
# Print a text banner. | |
echo -en $"\t\tWelcome to " | |
read -r redhat_release < /etc/redhat-release | |
PRODUCT=`sed "s/CentOS \(.*\) release.*/\1/" /etc/redhat-release` | |
echo -e "\\033[0;36m$PRODUCT\\033[0;39m" | |
# Clean up utmp/wtmp | |
> /var/run/utmp |
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
lxc.utsname = test | |
lxc.rootfs = /lxc/test/rootfs | |
lxc.cgroup.cpuset.cpus = 0,1 | |
lxc.cgroup.cpu.shares = 500 | |
lxc.network.type = macvlan | |
lxc.network.flags = up | |
lxc.network.link = eth0 | |
lxc.network.hwaddr = 4a:49:43:49:79:bf | |
lxc.network.ipv4 = 192.168.122.10/24 |
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
#!/usr/bin/perl | |
########################################################################### | |
# # | |
# Cluster Tools: cluster_netstat.pl # | |
# Copyright 2007-2010, Albert P. Tobey <[email protected]> # | |
# # | |
########################################################################### | |
=head1 NAME |
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
/* nsfork.c - like fork, but the child process is in a new namespace | |
* | |
* minimum linux kernel v2.6.24 | |
* requires root and/or CAP_SYS_ADMIN | |
* | |
*/ | |
#include <unistd.h> | |
#include <sys/syscall.h> | |
#include <signal.h> |
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
/* must run as root or with CAP_SYS_ADMIN | |
* e.g. sudo ./test_nsfork | |
* or | |
* sudo | |
*/ | |
#include "nsfork.h" | |
#include <stdio.h> |
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
import os | |
import sys | |
import optparse | |
import cfmtest.build | |
#import cfmtest.test | |
#import cfmtest.destroy | |
CFMTEST_COMMANDS = [ "build" ] #, "test", "destroy" ] | |
class CLI: |
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
$DefaultNetstreamDriver gtls # enable TLS via gnutls | |
$DefaultNetstreamDriverCAFile /etc/pki/certmaster/ca.cert # certmaster CA cert | |
$DefaultNetstreamDriverCertFile /etc/pki/certmaster/hostname.domain.com.cert # certmaster host certificate | |
$DefaultNetstreamDriverKeyFile /etc/pki/certmaster/hostname.domain.com.pem # certmaster host key | |
$InputTCPServerStreamDriverAuthMode x509/name # verify the client cert's subject | |
$InputTCPServerStreamDriverPermittedPeer *.domain.com # match client cert's domain for auth | |
$InputTCPServerRun 514 # start up listener on 514 |
OlderNewer