Skip to content

Instantly share code, notes, and snippets.

@rc5hack
rc5hack / install.cfg
Last active December 21, 2015 04:29
Auto-install config for FreeBSD
# install.cfg: auto-install config for FreeBSD sysinstall(8)
# @see /usr/src/usr.sbin/sysinstall/install.cfg
###################################################################################
debug=yes
nonInteractive=yes
#TODO: make some swap
disk=ad0
partition=all
@rc5hack
rc5hack / heredoc.sh
Created January 14, 2014 13:13
HEREDOC for bash
#!/usr/bin/env bash
NAME="John Doe"
RESPONDENT="author of this fine script"
cat <<EndOfMessage
Hi there, $NAME.
Greetings to you, '$NAME', from "$RESPONDENT".
EndOfMessage
#!/usr/bin/env python
import os, sys, commands
import argparse
import ConfigParser
version = '0.1.1'
default_monitoring_checks_cache_path = '/var/cache/monitoring'
def createParser ():
@rc5hack
rc5hack / evills
Last active August 29, 2015 14:15 — forked from Eugeny/evills
#!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
__all__ = ["transform"]
__version__ = '0.3'
__author__ = 'Christoph Burgmer <[email protected]>'
__url__ = 'http://github.com/cburgmer/upsidedown'
@rc5hack
rc5hack / delete-mbr-bootcode.sh
Created April 29, 2015 10:39
delete boot code from MBR
#!/bin/sh
if [ -z "$1" ] || [ ! -e $1 ] ; then
echo " !! Device '$1' not found" >&2
exit 1
fi
TMPFILE=`mktemp /tmp/mbr.XXXXXXXX`
if [ ! -e $TMPFILE ] ; then
FOR /R %%F IN (*.*) DO echo.>"%%F":Zone.Identifier