Skip to content

Instantly share code, notes, and snippets.

gem 'mechanize', '>=0.9.0'
require 'mechanize'
###
# Log in to itunes connect, get the list of applications.
#
# Example:
#
# ITunesConnect.new do |client|
# client.login '[email protected]', 'password'
#!/usr/bin/env ruby -wKU
require "socket"
# This prints a list of all the IPs associated with the domains in the following array
spam = %w{
ANIMAL-CROSSING-CHEATS.COM
aladdin-cheats.com
all-crysis-cheats.com
all-diablo-cheats.com
mysql> SELECT count(*) TABLES,
concat(round(sum(table_rows)/1000000,2),'M') rows,
concat(round(sum(data_length)/(1024*1024*1024),2),'G') DATA,
concat(round(sum(index_length)/(1024*1024*1024),2),'G') idx,
concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') total_size,
round(sum(index_length)/sum(data_length),2) idxfrac
FROM information_schema.TABLES;
+--------+----------+---------+--------+------------+---------+
| TABLES | rows | DATA | idx | total_size | idxfrac
+--------+----------+---------+--------+------------+---------+
#!/usr/bin/env ruby
require "rubygems"
require "xmpp4r"
user = "[email protected]"
pass = "password_goes_here"
jid = Jabber::JID.new(user)
client = Jabber::Client.new(jid)
Versioned pasties....neat