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/env python3 | |
import argparse | |
import itertools | |
import os | |
import subprocess | |
import sys | |
parser = argparse.ArgumentParser(description="set up zfs pool") | |
parser.add_argument("--mirror-size", type=int, default="2") | |
parser.add_argument("--disk-name-filter", type=str, default="*-ata-*.0") |
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
<Files webservices.wsgi> | |
# pass everything that isn't a Basic auth request through to Pulp | |
SetEnvIfNoCase ^Authorization$ "Basic.*" USE_APACHE_AUTH=1 | |
Order allow,deny | |
Allow from env=!USE_APACHE_AUTH | |
Satisfy Any | |
AuthType Basic | |
AuthBasicProvider ldap | |
AuthName "Pulp Login" |
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 | |
THINPOOL=$1 | |
yum -y install docker-engine | |
if [ ! -L $THINPOOL ]; then | |
echo "Pool $THINPOOL" does not appear to exist | |
exit 1 | |
fi | |
mkdir -p /etc/systemd/system/docker.service.d |
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 | |
sudo port -v install dnsmasq | |
sudo port -v load dnsmasq | |
sudo mkdir /etc/resolver | |
echo -n "nameserver 127.0.0.1" | sudo tee /etc/resolver/dev | |
echo "address=/dev/127.0.0.1" | sudo tee -a /opt/local/etc/dnsmasq.conf | |
echo "address=/test/127.0.0.1" | sudo tee -a /opt/local/etc/dnsmasq.conf | |
sudo kill -9 $(pgrep dnsmasq) | |
sleep 1 |
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 | |
set -eux | |
iso="$1" | |
hostname="$2" | |
kickstart="$3" | |
test "$(whoami)" == "root" || (echo "must be run as root!" ; exit 1) | |
ks="/var/lib/libvirt/images/$hostname-ks.iso" | |
ksd="$(mktemp -d)" |
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 | |
set -eux | |
eficode="$1" | |
efivars="$2" | |
wd="$(mktemp -d)" | |
vars="$wd/$(basename "$efivars")" | |
cp "$efivars" "$vars" |
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
Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | % { Get-ItemProperty $_.PSPath -Name DisplayName | Select -Property DisplayName } | Sort-Object -Property DisplayName | ConvertTo-Json |
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 | |
set -eu | |
if [[ ! -z "${DEBUG:-""}" ]]; then set -x; fi | |
ZONE="$1" | |
NEW="$2" | |
DIG="dig +short $ZONE" | |
DIGN="$DIG $NEW" | |
check_rrtype() { |
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
grep '^menuentry' /boot/grub2/grub.cfg | |
vi /etc/default/grub | |
# update GRUB_DEFAULT=<zero-indexed-menu-entry-from-grep> | |
grub2-mkconfig -o /boot/grub2/grub.cfg |
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
*filter | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [33:2996] | |
:ICMP - [0:0] | |
:TCP - [0:0] | |
:UDP - [0:0] | |
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -p icmpv6 -j ICMP |
NewerOlder