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/pseudo-bash | |
# Read through this and modify to taste. | |
# Tested on: | |
# dataset_uuid: c36a3d28-80c2-11e1-9ec6-df5bd8b43f76 | |
# sdc:sdc:smartosplus:3.2.0 | |
mkdir /data | |
useradd -d /data dev | |
groupadd dev | |
cd /data |
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 | |
# rotisascreen.sh | |
# - Rotate screens on occassion | |
screenCount=$(wmctrl -d | tail -n 1 | awk '{print $1}') | |
while true | |
do | |
count=1 | |
while [[ $count -le $screenCount ]] | |
do |
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
sudo su - | |
cd /usr/local/src | |
wget http://git-core.googlecode.com/files/git-1.7.6.4.tar.gz | |
tar zxvf git-1.7.6.4.tar.gz | |
cd git-1* | |
make clean && make distclean | |
make configure | |
./configure --prefix=/usr | |
make | |
make install |
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 | |
# Use this to send and receive files | |
# Dependencies: | |
# SSH-Keys setup for root users. I recommend using agent forwarding for this. | |
# mbuffer installed in /opt/local/bin/mbuffer. Adjust to reality. | |
# | |
# This script presumes: | |
# zsnapper is installed. Comment out the two lines where it is referenced if you don't use it | |
DATE=$(date +%Y%m%d%H%M) |
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 | |
# For installation of puppet by gem for smartos | |
# | |
VERSION=3.3.0 | |
PREFIX=/opt | |
mkdir -p /var/lib | |
cd ${PREFIX} | |
sudo gem install --no-ri --no-rdoc puppet |
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
def method_missing(sym, *args) | |
name = sym.to_s | |
if name[-1,1] == '=' | |
instance_variable_set( "@#{name[0, name.size - 1]}", *args) | |
else | |
instance_variable_get("@#{name}") | |
end | |
end |
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 | |
require 'awesome_print' | |
require 'pry' | |
require 'ostruct' | |
require 'resolv' | |
begin #top | |
puts "Reading worklist" |
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
from: http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in |
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
CHECKSUM=`cat $DIR/.syncme.sh.md5sum | awk '{print $1}'` | |
MYCHECKSUM=`md5sum $DIR/syncme.sh | awk '{print $1}'` | |
if [[ "$CHECKSUM" != "$MYCHECKSUM" ]] | |
then | |
echo "This script was modified." | |
exit 2 | |
else |
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
lsof | grep -i deleted | grep REG | grep -v txt | ruby -r 'pp' -e 'STDIN.each do |v| a = v.split(/ +/); puts `:> /proc/#{a[1]}/fd/#{a[3].chop}`; end' |
OlderNewer