start new:
tmux
start new with session name:
tmux new -s myname
#! /usr/share/foreman/script/rails runner -e production | |
Host.all.each do |host| | |
next unless host.dhcp? | |
print "#{host}..." | |
dhcp_record = host.dhcp_record | |
if dhcp_record.valid? | |
puts "VALID" | |
elsif dhcp_record.conflicting? | |
puts "CONFLICT" |
#!/usr/share/foreman/script/rails runner -e production | |
Host.all.each do |host| | |
next unless host.dhcp? | |
print "#{host}..." | |
dhcp_record = host.dhcp_record | |
print "#{dhcp_record}..." |
Mostly following the guide found here:
https://wiki.hpdd.intel.com/display/PUB/Create+and+Mount+a+Lustre+Filesystem
yum remove kernel-2.6.32-<whatever>*
yum install epel-release
yum localinstall --nogpgcheck http://archive.zfsonlinux.org/epel/zfs-release.el6.noarch.rpm
#!/usr/bin/python | |
#Brock Palen | |
# brockp@umich.edu | |
# | |
''' | |
Takes data in the form of: | |
metric number |
class PeekIter: | |
""" Create an iterator which allows you to peek() at the | |
next item to be yielded. It also stores the exception | |
and re-raises it on the next next() call. | |
""" | |
def __init__(self, iterable): | |
self._exn = None | |
self._it = iter(iterable) | |
self._peek = next(self._it) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(description=""" | |
I never freaking remember argparse syntax and the docs are so all over the place | |
that I need this for an example. |
from extras.reports import Report | |
from dcim.models import Device | |
from virtualization.models import VirtualMachine | |
from ipam.constants import * | |
from ipam.models import IPAddress, Prefix | |
LOOPBACK_ROLES = [ | |
IPADDRESS_ROLE_LOOPBACK, | |
IPADDRESS_ROLE_ANYCAST, | |
IPADDRESS_ROLE_VIP, |
# This configuration for nProbe exposes many more options than is available in the file provided | |
# when downloading nProbe. | |
# | |
# Most likely you will only need to change the -n and -i options for your environment. However, a | |
# number of other options are documented in case you need them. | |
# | |
# The provided template works very well with ElastiFlow - A solution to collect and analyze network | |
# flow data using the Elastic Stack. ElastiFlow is available from: | |
# https://github.com/robcowart/elastiflow |