Skip to content

Instantly share code, notes, and snippets.

View d34dh0r53's full-sized avatar

Dave Wilde d34dh0r53

View GitHub Profile
@cloudnull
cloudnull / cobbler-osa-multi-aio.sh
Last active December 6, 2016 12:14
Full Multi-Node OpenStack deployment using a single OnMetal host from the Rackspace Public Cloud. Read more in the "About this script" comment.
echo "this gist has been moved into a project please clone from here: https://github.com/cloudnull/osa-multi-node-aio"
@Apsu
Apsu / check-veths.sh
Last active December 4, 2015 03:06
Find veth pairs on the host which are not in any running containers
#!/usr/bin/env bash
# Create associative arrays
declare -A interior=()
declare -A exterior=()
# Make sure ethtool is installed on this host
apt-get install -y ethtool &>/dev/null
# For each container
@pascalpoitras
pascalpoitras / config.md
Last active September 3, 2024 23:28
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


How to feel good about your tests

Does writing tests and seeing them fail have you down? Add this new and improved test runner to your testing methodology and see your test runs improve.

#!/bin/sh
for ((i=0; i<$RANDOM; i++)); do echo -n '.' ; done ; echo ; echo '==== TESTS PASSED ====' ; echo 'Tests ran in 0.00s'

This one line will cure all your worries. Simply save it as a file called run_tests and run chmod 755 run_tests. Then whenever your tests have you down, run ./run_tests from the command line and see green.

@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'