Skip to content

Instantly share code, notes, and snippets.

View makewhatis's full-sized avatar

David Johansen makewhatis

View GitHub Profile
hudson = Hudson.instance
for (i = 0; i < 1000; i++) {
for (slave in hudson.slaves) {
def computer = slave.computer
print slave.computer
print "\n"
slave.computer.connect(true)
}
}
hudson = Hudson.instance
for (slave in hudson.slaves) {
def computer = slave.computer
if (slave.getComputer().isTemporarilyOffline()) {
if (!slave.getComputer().getOfflineCause().toString().contains("toggled by")) {
computer.setTemporarilyOffline(false, slave.getComputer().getOfflineCause())
}
} else {
slave.computer.connect(true)

Keybase proof

I hereby claim:

  • I am makewhatis on github.
  • I am makewhatis (https://keybase.io/makewhatis) on keybase.
  • I have a public key whose fingerprint is 3205 4CAA 20E7 932F 6847 3A2B EC22 B013 C579 6A72

To claim this, I am signing this object:

@makewhatis
makewhatis / query
Created October 26, 2012 02:12
query
SELECT DISTINCT snv.server_id AS server_id, S.name, S.release, SA.name as arch,
urn.user_id
FROM (
select rhnChannelErrata.errata_id, rhnChannelErrata.channel_id, rhnServerChannel.server_id, rhnErrataPackage.package_id
from rhnChannelErrata, rhnErrataPackage, rhnChannelNewestPackage, rhnPackageEVR,
rhnServerChannel, rhnServerPackage, rhnPackageUpgradeArchCompat
where rhnChannelErrata.errata_id = rhnErrataPackage.errata_id
and rhnChannelErrata.channel_id = rhnChannelNewestPackage.channel_id
and rhnErrataPackage.package_id = rhnChannelNewestPackage.package_id
and rhnChannelErrata.channel_id = rhnServerChannel.channel_id
@makewhatis
makewhatis / osad.py.patch
Created October 18, 2012 02:27
osad.py patch for hosts using custom ports
--- /usr/share/rhn/osad/osad.py 2012-10-18 09:52:01.000000000 -0700
+++ osad.py.new 2012-10-18 09:47:35.000000000 -0700
@@ -206,6 +206,17 @@
# No schema - trying to patch it up ourselves?
url = scheme + "://" + url
sch, netloc, path, params, query, fragment = urlparse.urlparse(url)
+
+ ipv6re = "^(([0-9a-zA-Z]{0,4}:){7})([0-9a-zA-Z]{0,4}):([0-9]{1,5})$"
+ ipv6_match = re.match(ipv6re, netloc)
+ if ipv6_match:
@makewhatis
makewhatis / gist:1250850
Created September 29, 2011 14:33
chef-solo-prep.sh
yum -y update
mkdir /etc/chef /root/chef-solo
wget -O /etc/chef/solo.rb https://gist.github.com/raw/847256/chef-gitorious-etc-solo.rb
wget -O /root/chef-solo/node.json https://gist.github.com/raw/847256/chef-gitorious-node-debian.json
echo "gem: --no-rdoc --no-ri" > /etc/gemrc
yum install -y ruby ruby-devel libruby gcc-c++ make ssl-cert git
cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.4.2.tgz
tar zxf rubygems-1.4.2.tgz
ruby rubygems-1.4.2/setup.rb --no-format-executable