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
use Net::DNS; | |
my $res = Net::DNS::Resolver->new; | |
my $query = $res->search("host.example.com"); | |
if ($query) { | |
foreach my $rr ($query->answer) { | |
next unless $rr->type eq "A"; | |
print $rr->address, "\n"; | |
} | |
} 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
#!/usr/local/bin/ruby | |
300.times do `time dd if=/dev/zero of=test.bin bs=100k count=1` | |
sleep 1 | |
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
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm |
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
mailman: "| /usr/bin/ruby /home/jtrout/loni-dlist/script/runner -e development 'Mailman.receive STDIN.read'" | |
rails_mailer: "/home/jtrout/loni-dlist/lib/mail_handler.rb" |
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/ruby | |
File.open("/home/jtrout/myfile").each { |line| | |
`rm #{line}` | |
} |
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
servers = ["viola-rs1.loni.ucla.edu", "viola-rs2.loni.ucla.edu" ] | |
servers.each do |server| | |
Net::SSH.start('#{server}', 'tester', :password => "xxxxxxxx") do |ssh| | |
output = ssh.exec!("hostname") | |
puts output | |
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 | |
#Requirements | |
require 'rubygems' | |
require 'net/ssh' | |
require 'patron' | |
servers = ["viola-dev.loni.ucla.edu"] | |
#servers = ["viola-rs1.loni.ucla.edu","viola-rs2.loni.ucla.edu", "viola-local.loni.ucla.edu", "aragon-rs1.loni.ucla.edu", "aragon-rs2.loni.ucla.edu" , "aragon-rs3.loni.ucla.edu", "aragon-rs4.loni.ucla.edu", "aragon-rs5.loni.ucla.edu" ] |
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 | |
#Requirements | |
require 'rubygems' | |
require 'net/ssh' | |
require 'patron' | |
require 'timeout' | |
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 'rubygems' | |
require 'logger' | |
require 'net/ssh' | |
require 'net/smtp' | |
require 'patron' | |
require 'timeout' | |
require 'parseconfig' |
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 'rubygems' | |
require 'optparse' | |
#def initialize | |
# @quotasize = nil | |
#end | |
def parse_arguments(args) |
OlderNewer