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
find . -name "*.txt" -ls | awk '{total += $7} END {print total}' |
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
sed -if '<number>d' file |
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
git log --pretty=format:"%h - %an - %ar - %s" | |
To ignore last modifications and restart over from your repository: | |
git stash save --keep-index; git pull; git stash drop |
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 | |
#Used examples in the following link: | |
#http://coldattic.info/shvedsky/pro/blogs/a-foo-walks-into-a-bar/posts/7 | |
#awk $0 is the entire line -> $1 is first argument -> line is making entire line equal first arg. | |
#will provision machines concurrently in vagrant | |
NUMPROCS='2' | |
vagrant up --no-provision;vagrant status |grep 'virtualbox' |awk '$0=$1'| xargs --max-procs=$NUMPROCS -I HOST vagrant provision HOST |
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
domain = 'familyguy.com' | |
VAGRANTFILE_API_VERSION = "2" | |
VAGRANT_BOX_URL = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box" | |
VAGRANT_TMP_NAME = "centos-min" | |
VBGUI = false | |
nodes = [ | |
{ :hostname => 'peter', :ip => '192.168.2.10', :box => 'centos-min' }, | |
{ :hostname => 'lois', :ip => '192.168.2.11', :box => 'centos-min' }, |
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 | |
#Create user list | |
cat /etc/passwd | awk -F : '{print $1}' > list | |
#Parse list and create organized list | |
USER=`cat list| while read line; do echo -n $line ;printf " "; done` | |
PWNEVER="PWNEVER.log" |
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 | |
MYHOST=`hostname -s` | |
MYPW='!QAZXSw2@' | |
MYUSER='root' | |
NEWPASS="$MYHOST$MYPW" | |
MYEMAIL='<email list>' | |
echo -e "$NEWPASS\n$NEWPASS" | (passwd --stdin $MYUSER) |
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
#Environment.rb | |
##Determines dns from hostname | |
Facter.add("mydns") do | |
setcode do | |
Senv = Facter.value('hostname').scan(/(^\D+\d)/) | |
if Senv.any? | |
Senv.to_s + ".promnetwork.com" | |
else | |
"no environment" |
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
Name: oracle-11g-pre-reqs | |
Version: 1 | |
Release: 1%{?dist} | |
Summary: This package is the pre-reqs for an Oracle install | |
Group: Miscellaneous | |
License: PIN | |
URL: http://www.promnetwork.com/syseng | |
Source0: oracle-11g-pre-reqs.tgz | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
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 ruby | |
#!/opt/puppet/bin/ruby | |
require 'trollop' | |
require 'rbvmomi' | |
require 'rbvmomi/trollop' | |
################ | |
# Parse Args # |
OlderNewer