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 | |
# [email protected] | |
# | |
''' | |
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, |
{ | |
"Version": "2012-10-17", | |
"Id": "S3PolicyId1", | |
"Statement": [ | |
{ | |
"Sid": "IPAllow", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::example.bucket/*", |