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 python | |
# | |
# Author: Hector Rivas <keymon@gmail.com> | |
# | |
# This scripts implements a simple plain external node classifier for puppet. | |
# It reads a plain .yaml file with all definitions returning the gived node name (or all if none) | |
# | |
# It supports: | |
# * inheretance, by setting an extra property in the node "include" and referencing | |
# other hosts, or by defining classes called "external:<name>" |
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/sh | |
SCRIPT_NAME=$0 | |
if [ $# -lt 2 ]; then | |
cat <<EOF | |
Updates the exported LUN of a mapped VTD (Virtual Target Device) device in a VIOS. | |
This script will set the device to "Defined" stated and then rescan the Virtual Adapter: | |
rmdev -l vtd |
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 | |
# Configuracion | |
IFACES="eth0 eth1 dummy0" | |
# OpenSSH only cares about inet and inet6. | |
# Get the gone, strange people still use ipx. | |
if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then | |
exit 0 | |
fi |
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/sh | |
# | |
# cgroup-ctl.sh | |
# | |
# :Author: Hector Rivas Gandara | |
# | |
# Based on comments in | |
# - http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html | |
# - http://lkml.org/lkml/2010/11/16/330 | |
# |
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/perl -w | |
# | |
# This script was developed by Robin Barker (Robin.Barker@npl.co.uk), | |
# from Larry Wall's original script eg/rename from the perl source. | |
# | |
# This script is free software; you can redistribute it and/or modify it | |
# under the same terms as Perl itself. | |
# | |
# Larry(?)'s RCS header: | |
# RCSfile: rename,v Revision: 4.1 Date: 92/08/07 17:20:30 |
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/env perl | |
# | |
# This is a simple script that "greps" an XML based on | |
# the names of the xml elements. It prints the contents | |
# of the Text data in that element | |
# | |
# Author: Hector Rivas | |
# | |
use XML::Parser; | |
use Getopt::Std; |
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
import sys | |
import subprocess | |
import threading | |
try: | |
import Queue as queue | |
except ImportError: | |
import queue | |
STDOUT = subprocess.STDOUT |
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/python | |
# -*- coding: utf-8 -*- | |
# | |
# Requirements | |
# - Data files must be in lvm | |
# - Optionally in xfs (xfs_freeze) | |
# - User must have LOCK TABLES and RELOAD privilieges:: | |
# | |
# grant LOCK TABLES, RELOAD on *.* | |
# to backupuser@localhost |
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/python | |
# -*- coding: utf-8 -*- | |
# | |
# This script reads apache log files entries from the standard input, parses them | |
# and stores them in a mongo database. | |
# | |
# Requires: | |
# - pymongo | |
# - apachelog: http://code.google.com/p/apachelog | |
# |
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/python | |
# -*- coding: utf-8 -*- | |
# | |
# Script: example_query_accesslog.py | |
import accesslog_parse_mongo | |
import sys | |
from datetime import datetime, timedelta | |
def main(): |
OlderNewer