Skip to content

Instantly share code, notes, and snippets.

@cloudnull
cloudnull / openstack_user_config.yml
Last active February 8, 2021 16:44
Minimal OpenStack-Ansible config using low spec gear.
---
cidr_networks:
container: "172.16.26.0/24"
tunnel: "172.29.240.0/22"
storage: "172.29.244.0/24"
used_ips:
- "172.16.26.1,172.16.26.50"
- "172.16.26.100,172.16.26.200"
@cloudnull
cloudnull / gist:e81115119dddee5e2a06
Created January 7, 2016 06:06
Example network interface file using a single bonded interface
## The default networking requires several bridges. These bridges were named to be informative
## however they can be named what ever you like and is adaptable to any network infrastructure
## environment. This file serves as an example of how to setup basic networking and was ONLY
## built for the purpose of being an example of an environment with a single bonded interface.
# Physical interface
# ------------------
# All nodes will have some physical interface
auto eth0
@JCallicoat
JCallicoat / disk_available_least.py
Last active June 27, 2020 13:24
Overview and code dive showing how disk_available_least is calculated
"""
How disk_available_least is calculated
======================================
Summary:
The nova-scheduler uses disk_available_least on the host to determine if there is enough space to boot / migrate / resize and instance of a given flavor.
This is the calculation scheduler uses:
@kmpm
kmpm / gist:6022b4de1023c712cdf7
Last active January 17, 2019 16:32
How to get VyOS to use the RTL8111/8168B Ethernet Controller in a Shuttle DS437

VyOS on Shuttle DS437

vyos >= 1.2.0-rc11

Everything just works... The 2 ethernet interfaces turned up as eth0 and eth2 and the internal wireless as wlan0. Everything I have tested so far with the interfaces just work out of the box, even wireless.

lspci -nn
@kwharrigan
kwharrigan / scan.sh
Last active March 1, 2019 01:54
A simple script to form a multipage PDF using scanimage / sane. It is hard-coded to my MF4270 device id as provided by scanimage -L.
outname=$1
startdir=$(pwd)
tmpdir=scan-$RANDOM
DEVICENAME=pixma:04A926B5_SFF780310398A
if [ $# -lt 1 ]
then
echo "Usage: scan.sh <filename.pdf>"
exit 1;
fi
@kamermans
kamermans / fail2ban-allstatus.sh
Created July 11, 2011 17:06
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done