Mick Rants

Add to Technorati Favorites

Top Commenters

Fed Bailing out AIG

Looks like the Fed is going to bail out AIG.  They are going to be doing so under section 13(3) of the Federal Reserve Act. The Fed said that they will lend up to $85 billion dollars.

A portion of the statement yesterday released by the fed as to their reasoning was, “The Board determined that, in current circumstances, a disorderly failure of AIG could add to already significant levels of financial market fragility and lead to substantially higher borrowing costs, reduced household wealth and materially weaker economic performance.”

Let’s see how crazy things get today.

Bookmark and Share

Comments (View)

This is just how it is.

Comments (View)

Barack Roll

If this is the only good thing that comes out of this election…  I’m satisfied.

Bookmark and Share

Comments (View)

Manga on Twitter has Gone Too Far

Is anyone else a little surprised and tired of Mangavatars littering the Twitter landscape?  I know I sure as fuck am.  And there’s enough of a consensus out there to have warranted someone to go as far as making this site ” http://www.stopthemanga.com “.

I follow 1386 people on twitter.  Not all update throughout the day, but a good portion of them do and I would say a quarter of the ones that update have changed their normal avatars to Mangavatars.  That’s a lot of people.

I thought they were cool at first, and still do, to a degree.  I went to the site and made my own.  I never had the intentions of putting it up on Twitter, but wanted to make one just for something to do and to see if I could (since I’m not artistic at all, and yes, this qualifies in my book).

I thought this community was about individualism, expression, communication, and sharing, not blatant bandwagoning.  Think about it…

Bookmark and Share

Comments (View)
Comments (View)

I Google Myself

Bookmark and Share

Comments (View)

Where White Chocolate Comes From

White chocolate comes from the furthest reaches, the highest elevations and the deepest parts of the Andes.  It’s made by gnomes who then sell it to the villagers below.

There’s still some question as to the actual process by which it’s made, but experts speculate that it’s made from… well, you know, the color matches…

Regardless of this speculation, unsespecting American coffee enthusiests order it in their coffee and drinks daily and is also consumed on its’ own.

I will never understand the draw people have for it, and I’m sure I never will.

Bookmark and Share

Comments (View)

MySQL Table Compare Between Replicated Servers

This script when run will log into a MySQL replication set of servers and take record of all tables in the configured databases and compare the amount of rows in them.  Let me know what you think.

use strict;
use DBI;
use Array::Compare;
use Data::Dumper;

my $dbHost1        = ‘DB1 HOST’;
my $dbHost2        = ‘DB2 HOST’;
my $db                = ‘mysql’;
my $dbUser          = ‘USERNAME’;
my $dbPass          = ‘PASSWORD’;
my $dsn1             = “DBI:mysql:$db:$dbHost1”;
my $dsn2             = “DBI:mysql:$db:$dbHost2”;

my ($repDatabase,$db2Table,$

db1Table,$db1Rows,$db2Rows,$diff,$db2Total,$db1Total,$binLog,$logPos);
my (@slaveResult,@db1RowCount,@db2RowCount,@db1Tables,@db2Tables);

my @repDatabases = (‘ENTER DATABASES HERE’);

print “\n”.”Analyzing row count differences…”.”\n”;
print “\t”.”Above:  DB2”.”\n”;
print “\t”.”Below:  DB1”.”\n”;
print “\n”;

my $dbh1 = DBI->connect($dsn1, $dbUser, $dbPass);
my $dbh2 = DBI->connect($dsn2, $atxDbUser, $atxDbPass);

foreach $repDatabase (@repDatabases) {

chomp($repDatabase);
my $sth1 = $dbh1->prepare(“USE $repDatabase”);
$sth1->execute() || die(“Unable to execute: $!”);

my $sth2 = $dbh2->prepare(“USE $repDatabase”);
$sth2->execute() || die(“Unable to execute: $!”);

my $sth3 = $dbh1->prepare(‘SHOW TABLES’);
$sth3->execute() || die(“Unable to execute: $!”);

my $sth4 = $dbh2->prepare(‘SHOW TABLES’);
$sth4->execute() || die(“Unable to execute: $!”);

while(@db2Tables = $sth3->fetchrow_array()) {
foreach $db2Table (@db2Tables) {
chomp($db2Table);
my $sth5 = $dbh1->prepare(“SELECT COUNT(*) FROM $db2Table”);
$sth5->execute() || die(“Unable to execute: $!”);
$db2Rows = $sth5->fetchrow_array();
push(@db2RowCount, (“$repDatabase:  $db2Table = $db2Rows”));
}
}
while(@db1Tables = $sth4->fetchrow_array()) {
foreach $db1Table (@db1Tables) {
chomp($db1Table);
my $sth6 = $dbh2->prepare(“SELECT COUNT(*) FROM $db1Table”);
$sth6->execute() || die(“Unable to execute: $!”);
$db1Rows = $sth6->fetchrow_array();
push(@db1RowCount, (“$repDatabase:  $db1Table = $db1Rows”));
}
}

}

my $comp = Array::Compare->new(Sep => ‘|’, Whitespace => 0);
my $result = $comp->full_compare(\@db2RowCount,\@db1RowCount);

my @union = my @inter = my @diff = ();
my %count = ();

foreach my $element (@db2RowCount,@db1RowCount) {

$count{$element}++;

};
foreach my $element (keys %count) {

push @union, $element;
push @{ $count{$element} > 1 ? \@inter : \@diff }, $element;

};

print “Table Difference: “.$result.”\n”;
print “\n”;
foreach my $diff (sort @diff) {

chomp($diff);
print “\t”.$diff.”\n”;

}
print “\n”;

Bookmark and Share

Comments (View)
Comments (View)

Beware of the Bear!

Bookmark and Share

Comments (View)