Skip to content

Instantly share code, notes, and snippets.

@acf
Created December 9, 2011 19:30
Show Gist options
  • Save acf/1452931 to your computer and use it in GitHub Desktop.
Save acf/1452931 to your computer and use it in GitHub Desktop.
s/old.ip/new.ip/g in a DNSimple account
require 'rubygems'
require 'dnsimple'
DNSimple::Client.username = 'randall@rstvideo.com'
DNSimple::Client.password = 'd34thst4r'
DNSimple::Client.debug = false
user = DNSimple::User.me
puts "#{user.domain_count} domains"
puts "Domains..."
DNSimple::Domain.all.each do |domain|
puts " #{domain.name}"
DNSimple::Record.all(domain).each do |record|
if record.content == "1.2.3.4"
puts "found type: #{record.record_type} name: #{record.name} content: #{record.content}"
record.content = "1.77.80.83"
record.save
end
end
end
Copy link

ghost commented Dec 9, 2011

I hope these are fake account credentials you put in there...

@acf
Copy link
Author

acf commented Dec 9, 2011 via email

Copy link

ghost commented Dec 10, 2011

Cool. Just making sure ;). That would have been a disastrous mistake. Thanks for the code.

@strathmeyer
Copy link

"Uh, yeah, hi. This is RST Video calling. Customer number 4352, I'd like to place an order. Okay, I need one each of the following tapes..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment