This file contains hidden or 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 | |
pdf=*.pdf | |
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=pdfmerged.pdf $pdf | |
# yeah!!!! |
This file contains hidden or 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 ruby | |
# | |
# The idea here is, tick is almost a linear function. We really want a | |
# tick_function and compare based on time of day, but this will do for now. | |
# | |
# We can almost determine the typical linear increase of errors | |
# based on time of day. So here we assume that the linear starts | |
# at 6am and increases until 6am the next day. | |
# | |
# NB: One flaw is that the values are less relevant before noon :} |
This file contains hidden or 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 | |
# I typically run something like this after a fresh install | |
######################################## | |
# What DISTRO are we installing on | |
######################################## | |
release=rh6 | |
ARCH=x86_64 | |
DISTRO=centos6.4 | |
ISO_DISTRO=CentOS6.4 |
This file contains hidden or 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 | |
MANAGMENTNODE=xcat | |
# passwords used in script | |
# root password for mysql | |
# ( if using user other than root modify below ) | |
SQL_ROOT_PASS=rootpw | |
# The password used by xcat | |
# ( you dont need to know this unless you decied to debug mysql ) | |
XCAT_PASS=xcat_user_passwd | |
# |
This file contains hidden or 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
DISTRO=centos6 | |
DISTRO_VERS=6.4 | |
ISO_ARCH=x86_64 | |
ISO_DISTRO=CentOS-${DISTRO_VERS} | |
RPM_MIRRIR=http://centos.mirror.iweb.ca | |
getisos(){ | |
for i in 1 2 | |
do | |
# http://centos.mirror.iweb.ca/6.4/isos/x86_64/CentOS-6.4-x86_64-bin-DVD1.iso | |
wget ${RPM_MIRRIR}/${DISTRO_VERS}/isos/${ISO_ARCH}/${ISO_DISTRO}-${ISO_ARCH}-bin-DVD${i}.iso |
This file contains hidden or 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 | |
# define vaiables | |
# In my real set up this is a lot more complex but if you are new to xcat | |
# this should be useful enought to get started | |
HOST_NAME=nodename | |
mac=00:50:56:b0:d0:00 | |
ip=192.168.13.16 | |
XCAT=192.168.13.100 | |
OS=centos6 |
This file contains hidden or 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 | |
# CREATE XCAT STATLESS IMAGE | |
# -- note you can not make a statless image for a distro other than the one this script is running on | |
# -- That is various tools will fail if you try to build fedora on centos, or centos6.1 on centos6.4 | |
# | |
# Setup DISTRO Variables | |
DIST=`lsb_release -i | cut -d: -f2 | sed 's/\s//g' ` | |
REL=`lsb_release -r | cut -d: -f2 | sed 's/\s//g' ` | |
MAJ=`echo $REL | cut -d. -f1 | sed 's/\s//g' ` | |
release=rh$MAJ |
This file contains hidden or 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 | |
# | |
# Some times you jsut want the files from an installed package... | |
# | |
for package in $( rpm -qa |egrep $1 ) | |
do | |
rpm -ql $package | xargs tar -czvf $package.tgz | |
done |
This file contains hidden or 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 | |
REMOTE_SYSTEM=$1 | |
# You want to filter out your ssh pipe from tcpdump. | |
# So we need to know what our IP is that is connecting to the system | |
# IF behind a firewall you will want to fix this | |
# | |
# There are more elegant ways than this, I just can remember them :} | |
# LOCAL_IP=$(ifconfig |grep 192 | cut -d: -f2 | cut -d\ -f1) | |
# |
This file contains hidden or 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 | |
# | |
# | |
# The following will Install autofs and create an AutoFS config that | |
# will mount SERVER:/EXPORT on MOUNT_POINT/$MOUNTNAME | |
# | |
# OPTION: | |
# You can also add all subdirs of a mount by adding a trailing "&" | |
# The following will mount each dir under /nfs/disks/ discreetly | |
# disks -rw server:/nfs/disks/& |