Skip to content

Instantly share code, notes, and snippets.

View FlorianHeigl's full-sized avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@schakko
schakko / check_microsoft_windows_software_raid.ps1
Last active January 31, 2025 15:56
A simple PowerShell script for retrieving the RAID status of volumes with help of diskpart. The nicer solution would be using WMI (which does not contain the RAID status in the Status field of Win32_DiskDrive, Win32_LogicalDisk or Win32_Volume for unknown reason) or using the new PowerShell API introduced with Windows 8 (wrong target system as o…
# A simple PowerShell script for retrieving the RAID status of volumes with help of diskpart.
# The nicer solution would be using WMI (which does not contain the RAID status in the Status field of Win32_DiskDrive, Win32_LogicalDisk or Win32_Volume for unknown reason)
# or using the new PowerShell API introduced with Windows 8 (wrong target system as our customer uses a Windows 7 architecture).
#
# diskpart requires administrative privileges so this script must be executed under an administrative account if it is executed standalone.
# check_mk has this privileges and therefore this script must only be copied to your check_mk/plugins directory and you are done.
#
# Christopher Klein <ckl[at]neos-it[dot]de>
# This script is distributed under the GPL v2 license.
@gmr
gmr / README.md
Last active April 12, 2020 22:06
Chef + Cobbler Integration files

Note: These work for us with Cobbler 2.2.3 and Chef 11.4.0 on CentOS

Quick Install

These are our install steps on CentOS 6:

mkdir -p ~/.chef/plugins/knife/
curl -o ~/.chef/plugins/knife/set_environment.rb https://gist.github.com/gmr/5339326/raw/5bd498d25bc2f4d17f029cdc4a34ed38e461fec2/set_environment.rb
curl -o /usr/lib/python2.6/site-packages/cobbler/modules/install_pre_chef.py https://gist.github.com/gmr/5339326/raw/0b248a8b40e5bac5673bd7df7cfd60185af778bc/install_pre_chef.py

curl -o /usr/lib/python2.6/site-packages/cobbler/modules/delete_post_chef.py https://gist.github.com/gmr/5339326/raw/ae71362ae721c0391f0be2f4b2166f3806e90a91/delete_post_chef.py

@dubiousjim
dubiousjim / buildroot-makes.patch
Last active May 18, 2026 01:20
configs and patches to make buildroot toolchain targeting Alpine Linux
--- ./package/gmp/gmp.mk.orig 2013-05-18 04:20:34.754578623 +0000
+++ ./package/gmp/gmp.mk 2013-05-18 04:23:55.340009552 +0000
@@ -11,6 +11,7 @@ GMP_INSTALL_STAGING = YES
GMP_LICENSE = LGPLv3+
GMP_LICENSE_FILES = COPYING.LIB
GMP_DEPENDENCIES = host-m4
+GMP_CONF_OPT = --enable-mpbsd --enable-cxx --with-pic
$(eval $(autotools-package))
$(eval $(host-autotools-package))
@cwacek
cwacek / cobbler-uefi-pxe-rhel.md
Last active January 17, 2022 21:26
A description of how to make Cobbler, PXE, and UEFI behave for Red Hat Enterprise Linux 6 installations

UEFI PXE Installation of RHEL6.4

For some reason, starting a PXE boot installation of RHEL6.4 on UEFI systems is poorly documented. Simultaneously, the process is not terribly verbose when it fails. Here's what I had to do to get this to work.

We going to use Cobbler to take care of a lot of the gruntwork (TFTP, DHCP, etc). It's entirely possible to do it without Cobbler, but even accounting for its warts it will make you more

@deepesh-agarwal
deepesh-agarwal / net_priority.sh
Last active February 10, 2022 15:57
Linux Traffic Prioritization Script
#!/bin/bash
# Personal note : add rules to /etc/rc.local file so they will be loaded after booting up
# Change modemif to your network interface value
modemif=eth0
iptables -t mangle -N ack
iptables -t mangle -A ack -m tos ! --tos Normal-Service -j RETURN
iptables -t mangle -A ack -p tcp -m length --length 0:128 -j TOS --set-tos Minimize-Delay
iptables -t mangle -A ack -p tcp -m length --length 128: -j TOS --set-tos Maximize-Throughput
@liveaverage
liveaverage / check_DFS_backlog.ps1
Last active September 11, 2025 08:07
Local Check_MK Powershell check that dynamically populates DFS Backlog Counts for all replicated folder groups. Outputs individual DFS backlog counts (one per replication direction) and performance data for individual replicated folder groups, along with a 'global' DFS Backlog count aggregating the status of all replication folder groups. The co…
$computer = [System.Net.Dns]::GetHostName()
$Computer = [System.Net.Dns]::GetHostName()
# Fix issue with console text wrap:
$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size (500, 300)
$OK = 0
$Warn = 1
$Crit = 2
$Unk = 3
@marcusphi
marcusphi / ansible_conditionals_examples.yaml
Created October 2, 2013 09:48
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files:
@biggers
biggers / opennebula-suse-install.rst
Created October 31, 2013 15:23
OpenNebula: openSUSE first-cut Deployment -- document

OpenNebula: openSUSE first-cut Deployment

Author: Mark Biggers <mbiggers@ine.com
Description:Install & configuration of OpenNebula (ONE) 4.x on openSUSE 12.3
Ref:SDB:Cloud OpenNebula: <http://en.opensuse.org/SDB:Cloud_OpenNebula>
Ref:ONE Installing the Software: <http://opennebula.org/documentation:rel4.2:ignc#opensuse_platform_notes>
Ref:KVM driver, KVM configuration: <http://opennebula.org/documentation:archives:rel4.0:kvmg#kvm_configuration>
Ref:ONE Rel 4.2 packages, for openSUSE: <http://download.opensuse.org/repositories/Cloud:/OpenNebula:/Testing/openSUSE_12.3/>
@syndicut
syndicut / Makefile
Last active April 16, 2025 01:41
Problem with parallel writes to moosefs from multiple nodes
CC = g++
PROGRAM = main
#CFLAGS = -g `pkg-config --cflags gtk+-x11-2.0` `pkg-config --cflags gtkextra-2.0`
#LDFLAGS = `pkg-config --libs gtk+-x11-2.0` `pkg-config --libs gtkextra-2.0`
CFLAGS = -g #`pkg-config --cflags gtk+-2.0`
LDFLAGS = -lpthread -lrt#`pkg-config --libs gtk+-2.0`
SOURCE = main.cc
OBJS = main.o
.cpp.o:
@martijnvermaat
martijnvermaat / ssh-agent-forwarding-screen.md
Created December 21, 2013 15:06
SSH agent forwarding and screen

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.