Skip to content

Instantly share code, notes, and snippets.

@UnknownEntity634
UnknownEntity634 / chatmosphere_hosts
Created August 24, 2013 22:27
Chatmosphere IPs
app1.chatmosphere.org has address 69.41.179.202
app2.chatmosphere.org has address 69.41.179.203
app3.chatmosphere.org has address 69.41.179.204
app4.chatmosphere.org has address 69.41.179.205
app5.chatmosphere.org has address 69.41.179.206
app6.chatmosphere.org has address 69.41.165.98
app7.chatmosphere.org has address 69.41.165.99
app8.chatmosphere.org has address 69.41.165.100
app9.chatmosphere.org has address 69.41.165.101
app10.chatmosphere.org has address 69.41.165.102
=begin
Type /parsebotlist and go get some noms depending on bot list length while it collects info.
Requires Ruby 1.9+ due to (?<variable>) and =~ usage
TODO:
- Make it wait between commands as to add the headings at the proper location instead of as the first 2 lines (this is literally my only timing problem left)
- Probably rewrite the regex matching (=~ buffer method) with a method for backwards compatibility with older Ruby
=end
require 'fileutils'
@UnknownEntity634
UnknownEntity634 / checkconfig.rb
Created January 5, 2012 02:25
Anope <= 1.8.x Deploy Script Cross-Section
#!/usr/bin/env ruby
dp = open('anope/data/services.conf') {|f| f.read }
matches = dp.scan(/^Mysql(.*)\w* "(.*?)"(.*)$/i)
zbot = dp.scan(/^zbotsql(.*)\w* "(.*?)"(.*)$/i)
# Tried (.*)\w* ((\d*)|("(.*?)"))(.*)$ to no avail
matches.each do |var|
puts var[0] + ' - ' + var[1]
end