<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkAHRX47eCp7ImA9WhRaFE0.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330</id><updated>2012-02-16T07:58:54.000-06:00</updated><category term="opsware" /><category term="CML" /><category term="vim" /><category term="Perl" /><category term="Windows" /><title>IT Non-whizzos</title><subtitle type="html">I search the Internet for answers to computer technical problems that I encounter.  When the Internet does not supply me with an answer, I research one on my own.  Then, I document the answer here so others can find it.

Also, for your benefit, this stupid blog name makes a great mnemonic.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://it-nonwhizzos.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>54</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/ItNon-whizzos" /><feedburner:info uri="itnon-whizzos" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CEcAQ3g_eip7ImA9WhRXFks.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-7094061222577574096</id><published>2011-12-16T16:44:00.000-06:00</published><updated>2011-12-23T11:40:42.642-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-23T11:40:42.642-06:00</app:edited><title>Perl: report total size of memory used by certain processes in Linux.</title><content type="html">Nothing fancy in this script. I merely have to write down my scripts somewhere, right?&lt;br /&gt;
&lt;br /&gt;
I originally wrote this to tell me how much memory a certain Apache instance was using. I made it slightly more general purpose. You pass it a regular expression that matches the processes which you want to see the total memory usage of. You can use a debug option to get more verbose output.&lt;br /&gt;
&lt;br /&gt;
I'm aware that the binary itself is not counted multiple times when totaling memory&amp;nbsp;consumption, but in Apache this always comes to less than 10% of the total, so I don't even bother anymore.&lt;br /&gt;
&lt;br /&gt;
Updated version after taking John's excellent suggestions below.

&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;use strict;
use warnings;
use Getopt::Long;

my $debug;
GetOptions('debug|verbose|d|v' =&amp;gt; \$debug);

die "Missing regular expression.\n" if ! $ARGV[0];

my $regex = shift;

my @ps_out = qx{ ps -eo pid,vsz,args };

my @proc_lines = grep { m/$regex/ } @ps_out;

my %pids = map { (split)[0,1] } @proc_lines;

delete $pids{$$};

my $total;
my $len = length((sort { $b &amp;lt;=&amp;gt; $a } values %pids)[0]);

for my $pid (keys %pids) {
    $total += $pids{$pid};
    printf "%s = %${len}s\n", $pid, $pids{$pid} if $debug;
}

$len = length($total);
print "=" x ($len + 11);
print "\n";

print "total KB = $total\n" if $debug;

my $mb_total = int($total / 1024);
printf "total MB = %${len}s\n", $mb_total;
&lt;/pre&gt;
&lt;br /&gt;
My original and very inefficient and inelegant version.

&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class="Apple-style-span" style="color: #f3f3f3;"&gt;use strict;
use warnings;
use Getopt::Long;

my $debug;
GetOptions('debug|verbose|d|v' =&amp;gt; \$debug);

die "Missing regular expression.\n" if ! $ARGV[0];

my $regex = shift;

my @ps_out = qx{ ps -ef };

my @proc_lines = grep { m/$regex/ } @ps_out;

my %pids;

for my $line (@proc_lines) {
    my $pid = (split /\s+/, $line)[1];
    my @out = qx{ ps -o vsz -p $pid };
    chomp @out;
    my $vsz = $out[-1];
    $vsz =~ s/\s+//;
    $pids{$pid} = $vsz;
}

my $total;
my $len = length((sort { $b &amp;lt;=&amp;gt; $a } values %pids)[0]);

for my $pid (keys %pids) {
    $total += $pids{$pid};
    printf "%s = %${len}s\n", $pid, $pids{$pid} if $debug;
}

$len = length($total);
print "=" x ($len + 11);
print "\n";

print "total KB = $total\n" if $debug;

my $mb_total = int($total / 1024);
printf "total MB = %${len}s\n", $mb_total;&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
Here is me using it.

&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ ./1.pl --debug '/httpd\.conf'
5293 =  10696
5298 = 290096
5294 =   7408
5296 = 289124
=================
total KB = 597324
total MB =    583
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-7094061222577574096?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/c99UJyMEQ0MCgNgVWeC-_EqBSVE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c99UJyMEQ0MCgNgVWeC-_EqBSVE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/c99UJyMEQ0MCgNgVWeC-_EqBSVE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c99UJyMEQ0MCgNgVWeC-_EqBSVE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/o5VNUQiboSA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/7094061222577574096/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/12/perl-report-total-size-of-memory-used.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/7094061222577574096?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/7094061222577574096?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/o5VNUQiboSA/perl-report-total-size-of-memory-used.html" title="Perl: report total size of memory used by certain processes in Linux." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/12/perl-report-total-size-of-memory-used.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcGQ3w-fyp7ImA9WhRSFkg.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-6630396570646070450</id><published>2011-11-18T15:43:00.001-06:00</published><updated>2011-11-18T16:07:02.257-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-18T16:07:02.257-06:00</app:edited><title>AJP ping/pong: update to ajp_ping.pl.</title><content type="html">I wrote a terrible ping script for AJP a &lt;a href="http://it-nonwhizzos.blogspot.com/2009/05/ajp-ping-in-perl.html" target="_blank"&gt;while back&lt;/a&gt;.&amp;nbsp;Here is an updated version.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/usr/bin/perl -w

use warnings;
use strict;

use Socket;

my $host = 'localhost';
my $port = '8009';

# The host and port arguments can be specified by either space or colon
# separating the values.
if (scalar(@ARGV) &amp;gt;= 2) {
    $host = shift @ARGV;
    $port = shift @ARGV;
}
elsif (scalar(@ARGV) == 1) {
    if ($ARGV[0] =~ /:/) {
        ($host, $port) = split /:/, shift @ARGV, 2;
    }
    else {
        $host = shift @ARGV;
    }
}

# If the port has anything other than numbers, assume it is an /etc/services
# name.
if ($port =~ /\D/) {
    $port = getservbyname $port, 'tcp' ;
    die "Bad port: $port" unless $port;
}

my $iaddr = inet_aton($host) or die "No such host: $host";

# Get a printable IP address from the in_addr_t type returned by inet_aton().
my $ip = join('.', unpack('C4', $iaddr));

# Now that the port value is a number, and the host (if it was originally a
# name) has been resolved to an IP address, then print a status header like
# the real ping does.
print "AJP PING $host ($ip) port $port\n";

my $paddr = sockaddr_in($port, $iaddr) or die $!;

# Grab the number for TCP out of /etc/protocols.
my $proto = getprotobyname 'tcp' ;

my $sock;
# PF_INET and SOCK_STREAM are constants imported by the Socket module.  They
# are the same as what is defined in sys/socket.h.
socket $sock, PF_INET, SOCK_STREAM, $proto or die $!;

# This is the ping packet.  For detailed documentation, see
# http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html
# I stole the exact byte sequence from
# http://sourceforge.net/project/shownotes.php?group_id=128058&amp;amp;release_id=438456
# instead of fully understanding the packet structure.
my $ping = pack 'C5'    # Format template.
    , 0x12, 0x34        # Magic number for server-&amp;gt;container packets.
    , 0x00, 0x01        # 2 byte int length of payload.
    , 0x0A              # Type of packet. 10 = CPing.
;

# If the connection is closed, log a decent message.
$SIG{PIPE} = sub { die $!; };

connect $sock, $paddr or die $!;

syswrite $sock, $ping or die $!;

print 'Sent:     ';
for my $value (unpack 'C5', $ping) {
    printf '%02d ', $value;
}
print "\n";

my $pong;

$pong = 0;

sysread $sock, $pong, 5 or die $!;

print 'Received: ';
for my $value (unpack 'C5', $pong) {
    printf '%02d ', $value;
}
print "\n";

close $sock or warn $!;

# This is the expected pong packet.  That is, this is what Tomcat sends back
# to indicate that it is operating OK.
my $expected = pack 'C5'    # Format template.
    , 0x41, 0x42            # Magic number for container-&amp;gt;server packets.
    , 0x00, 0x01            # 2 byte int length of payload.
    , 0x09                  # Type of packet. 9 = CPong reply.
;

print 'Expected: ';
for my $value (unpack 'C5', $expected) {
    printf '%02d ', $value;
}
print "\n";

if ($pong eq $expected) {
    print "Server pong OK.\n";
    exit 0;
}

print "Server pong FAILED.\n";
exit 1;
&lt;/pre&gt;
&lt;br /&gt;
Here it is running against a good host.

&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;me@mybox:~/ajp_ping
$ ./ajp_ping.pl xxx 12440 ; echo rc = $?
AJP PING xxx (10.1.1.16) port 12440
Sent:     18 52 00 01 10
Received: 65 66 00 01 09
Expected: 65 66 00 01 09
Server pong OK.
rc = 0
&lt;/pre&gt;
&lt;br /&gt;
Here is a bad response. I went to an HTTP port instead of an AJP one.

&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;me@mybox:~/ajp_ping
$ ./ajp_ping.pl xxx 12040 ; echo rc = $?
AJP PING xxx (10.1.1.16) port 12040
Sent:     18 52 00 01 10
Received: 72 84 84 80 47
Expected: 65 66 00 01 09
Server pong FAILED.
rc = 1
&lt;/pre&gt;
&lt;br /&gt;
Here is a timeout (using system TCP timeout defaults).

&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;me@mybox:~/ajp_ping
$ time ./ajp_ping.pl yyy 12040 ; echo rc = $?
AJP PING yyy (10.16.1.8) port 12040
Connection timed out at ./ajp_ping.pl line 67.

real    0m21.031s
user    0m0.010s
sys     0m0.018s
rc = 110
&lt;/pre&gt;
&lt;br /&gt;
Here is an attempt at a connection to a port where nothing is listening.

&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;me@mybox:~/ajp_ping
$ ./ajp_ping.pl xxx 99 ; echo rc = $?
AJP PING xxx (10.1.1.16) port 99
Connection refused at ./ajp_ping.pl line 67.
rc = 111
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-6630396570646070450?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/EGU943KuJZBERjUHunkigO4s2zY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EGU943KuJZBERjUHunkigO4s2zY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/EGU943KuJZBERjUHunkigO4s2zY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EGU943KuJZBERjUHunkigO4s2zY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/S7lTcHRbY8M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/6630396570646070450/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/11/ajp-pingpong-update-to-ajppingpl.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/6630396570646070450?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/6630396570646070450?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/S7lTcHRbY8M/ajp-pingpong-update-to-ajppingpl.html" title="AJP ping/pong: update to ajp_ping.pl." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/11/ajp-pingpong-update-to-ajppingpl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEMSX4_eSp7ImA9WhRTFUQ.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-1209802492695089255</id><published>2011-11-06T09:50:00.001-06:00</published><updated>2011-11-06T09:51:28.041-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-06T09:51:28.041-06:00</app:edited><title>Viewing hard drive in Finder on OS X Lion.</title><content type="html">Apple has cleaned up the left column in Finder windows on Lion. It no longer lists the hard drive or the whole computer itself.&lt;br /&gt;
&lt;br /&gt;
So now the way I navigate to top of the hierarchy in a Finder window is my CTRL-clicking on the folder name at the top of the window. This brings up a mini pull down menu of the hierarchy. Like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-iGncg4pITeI/Trashfs6lqI/AAAAAAAAAl8/EMntBP2dfIY/s1600/Screen+Shot+2011-11-06+at+9.14.13+AM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="364" src="http://1.bp.blogspot.com/-iGncg4pITeI/Trashfs6lqI/AAAAAAAAAl8/EMntBP2dfIY/s640/Screen+Shot+2011-11-06+at+9.14.13+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-1209802492695089255?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/w3a77yBBj8nLibnWYghxjKh92ys/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w3a77yBBj8nLibnWYghxjKh92ys/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/w3a77yBBj8nLibnWYghxjKh92ys/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w3a77yBBj8nLibnWYghxjKh92ys/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/J7nY7oh7zwA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/1209802492695089255/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/11/viewing-hard-drive-in-finder-on-os-x.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/1209802492695089255?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/1209802492695089255?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/J7nY7oh7zwA/viewing-hard-drive-in-finder-on-os-x.html" title="Viewing hard drive in Finder on OS X Lion." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-iGncg4pITeI/Trashfs6lqI/AAAAAAAAAl8/EMntBP2dfIY/s72-c/Screen+Shot+2011-11-06+at+9.14.13+AM.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/11/viewing-hard-drive-in-finder-on-os-x.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MHRHY5cCp7ImA9WhRTFEQ.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-3494026893712318076</id><published>2011-11-05T07:17:00.000-05:00</published><updated>2011-11-05T07:17:15.828-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-05T07:17:15.828-05:00</app:edited><title>Xcode "Save All" is still Opt+Cmd+S</title><content type="html">Not sure why this was taken from the File pull down menu in the last several versions of Xcode, but the hotkey for it still works:&amp;nbsp;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;img alt="Option or Alt key icon" height="9" src="http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1343/ks_option.gif" style="border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial;" width="9" /&gt;&amp;nbsp;&lt;img alt="Command key icon" height="9" src="http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1343/ks_command.gif" style="border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial;" width="9" /&gt;&amp;nbsp;S.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-3494026893712318076?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FlY6AxNnJlhB_Zd3hlTObErWiU0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FlY6AxNnJlhB_Zd3hlTObErWiU0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FlY6AxNnJlhB_Zd3hlTObErWiU0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FlY6AxNnJlhB_Zd3hlTObErWiU0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/hyIztt2PSts" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/3494026893712318076/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/11/xcode-save-all-is-still-optcmds.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/3494026893712318076?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/3494026893712318076?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/hyIztt2PSts/xcode-save-all-is-still-optcmds.html" title="Xcode &quot;Save All&quot; is still Opt+Cmd+S" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/11/xcode-save-all-is-still-optcmds.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4ESH44fCp7ImA9WhdaGU4.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-5079832694453517460</id><published>2011-10-29T19:32:00.001-05:00</published><updated>2011-10-29T19:35:09.034-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-29T19:35:09.034-05:00</app:edited><title>How does UIApplicationMain figure out its delegate?</title><content type="html">I didn't mean to turn this blog into a list of bookmarks, but&amp;nbsp;I was curious how my iOS app got from &lt;b&gt;main.m&lt;/b&gt; to &lt;b&gt;MyAppDeletegate.m&lt;/b&gt;, and this is just too good an explanation to not document:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://oleb.net/blog/2011/06/app-launch-sequence-ios/"&gt;http://oleb.net/blog/2011/06/app-launch-sequence-ios/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I found this when I was wondering, "How the hell does the &lt;b&gt;UIApplicationMain&lt;/b&gt; figure out its delegate?" Hence, the title of this post. The answer is so simple and straightforward that it is stunning. Thanks in no small part to Ole Begemann, of course.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-5079832694453517460?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GJF91QiM_ql_LCUuW3s5tLr7unQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GJF91QiM_ql_LCUuW3s5tLr7unQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GJF91QiM_ql_LCUuW3s5tLr7unQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GJF91QiM_ql_LCUuW3s5tLr7unQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/5y5zoOSfxso" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/5079832694453517460/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/10/how-does-uiapplicationmain-figure-out.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/5079832694453517460?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/5079832694453517460?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/5y5zoOSfxso/how-does-uiapplicationmain-figure-out.html" title="How does UIApplicationMain figure out its delegate?" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/10/how-does-uiapplicationmain-figure-out.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQESX08eCp7ImA9WhdaGU8.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-6039257127504644548</id><published>2011-10-29T17:28:00.000-05:00</published><updated>2011-10-29T17:28:28.370-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-29T17:28:28.370-05:00</app:edited><title>Add Framework to Project in Xcode 4.1</title><content type="html">Not sure why this got so hard in Xcode 4.1, but this guy covered it great:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.thinketg.com/Company/Blogs/11-03-20/Xcode_4_Tips_Adding_frameworks_to_your_project.aspx"&gt;http://www.thinketg.com/Company/Blogs/11-03-20/Xcode_4_Tips_Adding_frameworks_to_your_project.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thank you, David!&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Recorded for posterity.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-6039257127504644548?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GfM_e_S6Z-pmRmCgXtmsWCp33aY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GfM_e_S6Z-pmRmCgXtmsWCp33aY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GfM_e_S6Z-pmRmCgXtmsWCp33aY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GfM_e_S6Z-pmRmCgXtmsWCp33aY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/lb_LzUvTFbk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/6039257127504644548/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/10/add-framework-to-project-in-xcode-41.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/6039257127504644548?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/6039257127504644548?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/lb_LzUvTFbk/add-framework-to-project-in-xcode-41.html" title="Add Framework to Project in Xcode 4.1" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/10/add-framework-to-project-in-xcode-41.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8DQ306eCp7ImA9WhdbEks.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-3563108095571479696</id><published>2011-10-10T12:13:00.004-05:00</published><updated>2011-10-10T12:14:32.310-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-10T12:14:32.310-05:00</app:edited><title>List Windows 7 shares and Twig's Tech Tips</title><content type="html">Thank you Windows guy:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://twigstechtips.blogspot.com/2009/08/list-and-unshare-folders-in-windows-7.html"&gt;http://twigstechtips.blogspot.com/2009/08/list-and-unshare-folders-in-windows-7.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You should be the #1 hit for a search of "windows 7 list all shares" instead of #2.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-3563108095571479696?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6rTCVvVCeOkKg4OddPqtIp6jyOY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6rTCVvVCeOkKg4OddPqtIp6jyOY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6rTCVvVCeOkKg4OddPqtIp6jyOY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6rTCVvVCeOkKg4OddPqtIp6jyOY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/3opXuoHe3aM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/3563108095571479696/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/10/list-windows-7-shares-and-twigs-tech.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/3563108095571479696?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/3563108095571479696?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/3opXuoHe3aM/list-windows-7-shares-and-twigs-tech.html" title="List Windows 7 shares and Twig's Tech Tips" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/10/list-windows-7-shares-and-twigs-tech.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcCQnc6eip7ImA9WhdTFE0.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-8347677112548951160</id><published>2011-07-11T11:48:00.002-05:00</published><updated>2011-07-11T11:51:03.912-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-11T11:51:03.912-05:00</app:edited><title>Don't forget this.</title><content type="html">&lt;a href="http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect"&gt;http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I may be stupid, but if I constantly look for this in myself, then I have a better chance of reducing the impact of my stupidity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-8347677112548951160?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9jAMSFEGZonqFMYwEiBZQE0y27M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9jAMSFEGZonqFMYwEiBZQE0y27M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9jAMSFEGZonqFMYwEiBZQE0y27M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9jAMSFEGZonqFMYwEiBZQE0y27M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/t9cKgKGbG8M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/8347677112548951160/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/07/dont-forget-this.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8347677112548951160?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8347677112548951160?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/t9cKgKGbG8M/dont-forget-this.html" title="Don't forget this." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/07/dont-forget-this.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QER346eSp7ImA9WhZaFUk.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-5856229746660986274</id><published>2011-07-01T12:23:00.002-05:00</published><updated>2011-07-01T12:28:26.011-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-01T12:28:26.011-05:00</app:edited><title>Most important NFS link of all time.</title><content type="html">I might be a tad nonobjective about this right now, but everyone should know this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nfsworld.blogspot.com/2005/03/whats-deal-on-16-group-id-limitation.html"&gt;http://nfsworld.blogspot.com/2005/03/whats-deal-on-16-group-id-limitation.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-5856229746660986274?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lFB4cMtrfno9I6x6QT442ebMiYw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lFB4cMtrfno9I6x6QT442ebMiYw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lFB4cMtrfno9I6x6QT442ebMiYw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lFB4cMtrfno9I6x6QT442ebMiYw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/lu1X3untFp8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/5856229746660986274/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/07/most-important-nfs-link-of-all-time.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/5856229746660986274?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/5856229746660986274?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/lu1X3untFp8/most-important-nfs-link-of-all-time.html" title="Most important NFS link of all time." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/07/most-important-nfs-link-of-all-time.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8HR3o_eyp7ImA9WhZTE08.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-227695365788977218</id><published>2011-03-16T20:39:00.006-05:00</published><updated>2011-03-16T21:10:36.443-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-16T21:10:36.443-05:00</app:edited><title>Perl throw-away: finding mtime of cron jobs commands from cron log (AIX)</title><content type="html">We had two AIX boxes use all of their memory (real + paging) today. Looking back over performance logs this happened suddenly and exactly on the hour.&lt;br /&gt;&lt;br /&gt;The precise time at the top of the hour points to a possible cron job problem. You know how humans are: always scheduling things at nice round numbers.&lt;br /&gt;&lt;br /&gt;I wanted to parse the cron logs for all the commands there were run. The first thing I wanted to do was to check the mtime and see if anything changed recently.&lt;br /&gt;&lt;br /&gt;Here is a sample of the cron logs AIX spits out.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;bob1    : CMD ( [[ -f /opt/bin/Logging.ksh ]] &amp;&amp; /opt/bin/Logging.ksh start &gt;/dev/null 2&gt;&amp;1 &amp; ) : PID ( 512208 ) : Wed Mar 16 20:15:00 2011&lt;br /&gt;bob1    : CMD ( /home/bob1/scripts/check.pl ) : PID ( 843892 ) : Wed Mar 16 20:15:00 2011&lt;br /&gt;root      : CMD ( /etc/init.d/agent status &gt; /dev/null 2&gt;&amp;1 || /etc/init.d/agent start &gt; /dev/null 2&gt;&amp;1&lt;br /&gt;) : PID ( 258288 ) : Wed Mar 16 20:15:00 2011&lt;br /&gt;root      : CMD ( /opt/bin/get_down &gt;/dev/null 2&gt;&amp;1 ) : PID ( 548972 ) : Wed Mar 16 20:15:00 2011&lt;br /&gt;Cron Job with pid: 512208 Successful&lt;br /&gt;Cron Job with pid: 548972 Successful&lt;br /&gt;Cron Job with pid: 258288 Successful&lt;br /&gt;Cron Job with pid: 843892 Successful&lt;br /&gt;bob1    : CMD ( [[ -f /etc/init.d/xyz_3.6 ]] &amp;&amp; /etc/init.d/xyz_3.6 restart &gt;/dev/null 2&gt;&amp;1 ) : PID ( 950448 ) :&lt;br /&gt; Wed Mar 16 20:16:00 2011&lt;br /&gt;root      : CMD ( /opt/bin/get_down &gt;/dev/null 2&gt;&amp;1 ) : PID ( 258052 ) : Wed Mar 16 20:16:00 2011&lt;br /&gt;Cron Job with pid: 258052 Successful&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here is my perl script to grab the command and report on their mtimes.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl -wan&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;use POSIX qw(strftime);&lt;br /&gt;&lt;br /&gt;# Hash key = command, value = mtime.&lt;br /&gt;our %cmds;&lt;br /&gt;&lt;br /&gt;if ( /CMD \(/ ) {&lt;br /&gt;    if ($F[4] =~ /^\//) {&lt;br /&gt;        $cmds{$F[4]} = strftime('%Y-%m-%dT%H:%M:%S', localtime((stat($F[4]))[9]));&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;END {&lt;br /&gt;    for my $cmd (sort(keys %cmds)) {&lt;br /&gt;        print "$cmds{$cmd}\t$cmd\n";&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here is the example output.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;root@ccaitacb:/tmp/jmm6ry&lt;br /&gt;# ./1.pl log&lt;br /&gt;2009-11-25T16:03:42     /etc/init.d/agent&lt;br /&gt;2008-04-04T14:33:25     /home/archie/bin/clearWebLogs.sh&lt;br /&gt;2010-09-24T16:49:29     /home/bob1/scripts/check.pl&lt;br /&gt;2003-09-10T13:32:04     /opt/bin/get_webdat&lt;br /&gt;2004-01-06T16:28:08     /opt/bin/nim_prep&lt;br /&gt;2004-01-06T16:28:08     /opt/bin/clr_tmp&lt;br /&gt;2003-09-11T08:12:17     /opt/bin/get_down&lt;br /&gt;2004-04-12T14:36:29     /opt/bin/xy_clr_tmp&lt;br /&gt;2010-03-01T19:18:20     /usr/bin/errclear&lt;br /&gt;2006-10-24T23:34:02     /usr/lib/ras/dumpcheck&lt;br /&gt;2010-10-04T01:55:44     /var/perf/pm/bin/pmcfg&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you're thinking, "Hey, stupid, just look in the crontab files for that info," ummm, yeah, I had a reason for doing it this way, I'm sure of it. I just can't think of it right now.&lt;br /&gt;&lt;br /&gt;You'll also see that my script does not actually get all the commands. I guess I need to fix that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-227695365788977218?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2H-JwqvQnEvL0Wj7PaXAfeQ3j1Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2H-JwqvQnEvL0Wj7PaXAfeQ3j1Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2H-JwqvQnEvL0Wj7PaXAfeQ3j1Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2H-JwqvQnEvL0Wj7PaXAfeQ3j1Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/mc8n4VGKuo4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/227695365788977218/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/03/perl-throw-away-finding-mtime-of-cron.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/227695365788977218?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/227695365788977218?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/mc8n4VGKuo4/perl-throw-away-finding-mtime-of-cron.html" title="Perl throw-away: finding mtime of cron jobs commands from cron log (AIX)" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/03/perl-throw-away-finding-mtime-of-cron.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AERXYzeyp7ImA9Wx9aFEk.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-435783310730304033</id><published>2011-03-06T14:00:00.002-06:00</published><updated>2011-03-06T14:01:44.883-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-06T14:01:44.883-06:00</app:edited><title>Perl one-liner: count Apache connections to local app servers.</title><content type="html">I had this one-liner lying around that I meant to drop on here. Looking at it I'm fairly certain the scenario was as follows.&lt;br /&gt;
&lt;br /&gt;
This one box has a single Apache (IBM HTTP Server, really) instance talking to a lot of different application servers (WebSphere), which also run locally. Ignore the wisdom or lack thereof for this configuration. For whatever reason (verify load balance settings?), I had to count the number of connections Apache was making to each application server.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;root@somebox:/tmp
# lsof -i TCP -P | perl -ane 'next unless /^httpd/ &amp;&amp; /-&gt;somebox/; $p{(split(":", $F[-2]))[2]}++; END { for $i (keys %p) {print  "$i = $p{$i}\n"}}'
8056 = 305
8054 = 30
8053 = 27
8057 = 31
8050 = 353
&lt;/pre&gt;&lt;br /&gt;
So as we can see, at the time I ran this script, the balance of connections was really lopsided. The application server listening on port 8056 had 305 connections and the one listening at port 8054 had 30 connections, and so on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-435783310730304033?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GemQ_Q4G2n1J2mi6wXOewl5VxO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GemQ_Q4G2n1J2mi6wXOewl5VxO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GemQ_Q4G2n1J2mi6wXOewl5VxO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GemQ_Q4G2n1J2mi6wXOewl5VxO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/a5tZIG3M8nY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/435783310730304033/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/03/perl-one-liner-count-apache-connections.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/435783310730304033?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/435783310730304033?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/a5tZIG3M8nY/perl-one-liner-count-apache-connections.html" title="Perl one-liner: count Apache connections to local app servers." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/03/perl-one-liner-count-apache-connections.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cEQHc-fCp7ImA9Wx9aFE4.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-8608366359907602817</id><published>2011-03-04T17:12:00.009-06:00</published><updated>2011-03-06T13:16:41.954-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-06T13:16:41.954-06:00</app:edited><title>Perl throw-away: extracting info from giant list of file names.</title><content type="html">I had a giant list of files that followed a pattern similar to this:&lt;br /&gt;
&lt;pre&gt;me@mybox:~/sandbox
$ ls -rlt
total 0
-rw-r--r-- 1 root root 0 Mar  4 18:10 bob.1234.x
-rw-r--r-- 1 root root 0 Mar  4 18:10 bob.9870.x
-rw-r--r-- 1 root root 0 Mar  4 18:10 bob.3245.x
&lt;/pre&gt;&lt;br /&gt;
Except there were thousands of these files, not just three.&lt;br /&gt;
&lt;br /&gt;
I need to get a sorted list of the numbers in each file name.  I did this:&lt;br /&gt;
&lt;pre&gt;me@mybox:~/sandbox
$ perl -e '@f = glob("bob*"); @s = map {substr($_,4,4)} @f; for $n (sort(@s)) {print "$n\n";}'
1234
3245
9870
&lt;/pre&gt;&lt;br /&gt;
Yes, I could have done this in the shell.&lt;br /&gt;
&lt;pre&gt;me@mybox:~/sandbox
$ ls -1 bob* | cut -c5-8 | sort
1234
3245
9870
&lt;/pre&gt;&lt;br /&gt;
Using &lt;tt&gt;join&lt;/tt&gt; instead of &lt;tt&gt;for&lt;/tt&gt; now looks pretty because of Anonymous comment below.  Thanks, buddy.&lt;br /&gt;
&lt;pre&gt;jbm@Foucault:~/tmp
$ ls bob*
bob.0012.x bob.7123.x bob.9865.x
jbm@Foucault:~/tmp
$ perl -le '@f = glob("bob*"); @s = map {substr($_,4,4)} @f; print join("\n",sort(@s));'
0012
7123
9865
&lt;/pre&gt;&lt;br /&gt;
&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;poisonbit&lt;/em&gt; and &lt;em&gt;Yanick&lt;/em&gt; have more flexible solutions in the comments below because they don't rely on my brain dead method of counting the exact columns in which the digits appear in the file name.&lt;br /&gt;
&lt;br /&gt;
Of course, poisonbit's solution requires cool bash features, and Yanick's requires newer Perl builds. Using their better answer in crustier Perl or Korn shell is left as an exercise for the reader.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-8608366359907602817?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pvSffUfSmy_b1RANCTq1j4I7vm8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pvSffUfSmy_b1RANCTq1j4I7vm8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pvSffUfSmy_b1RANCTq1j4I7vm8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pvSffUfSmy_b1RANCTq1j4I7vm8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/Ba5gDzBE55g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/8608366359907602817/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/03/perl-throw-away-extracting-info-from.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8608366359907602817?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8608366359907602817?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/Ba5gDzBE55g/perl-throw-away-extracting-info-from.html" title="Perl throw-away: extracting info from giant list of file names." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/03/perl-throw-away-extracting-info-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AGSH0-eyp7ImA9Wx9UGEQ.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-7095058052895396870</id><published>2011-02-16T15:15:00.006-06:00</published><updated>2011-02-16T15:28:49.353-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-16T15:28:49.353-06:00</app:edited><title>Perl throw-away: Apache HTTP status codes count by hour.</title><content type="html">With the &lt;strong&gt;combined&lt;/strong&gt; &lt;em&gt;LogFormat&lt;/em&gt;.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I wanted status return code counts for /myuri broken down by hour.  I was looking into back end Tomcat problems.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl -anw&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;&lt;br /&gt;our %data;&lt;br /&gt;&lt;br /&gt;next if ! m{GET /myuri/};&lt;br /&gt;&lt;br /&gt;my $hour = substr($F[3],13,2);&lt;br /&gt;&lt;br /&gt;# To get status in this CustomLog format, first, throw away everything up to&lt;br /&gt;# the "GET &amp;lt;URI&amp;gt;" field...&lt;br /&gt;my $status = $_;&lt;br /&gt;$status =~ s/^.*HTTP\/1\.[10]"\s*//;&lt;br /&gt;# ...then grab the first field after that.&lt;br /&gt;$status = (split(/\s+/, $status))[0];&lt;br /&gt;&lt;br /&gt;$data{$hour}-&gt;{$status}++;&lt;br /&gt;&lt;br /&gt;END {&lt;br /&gt;    for my $h (sort(keys %data)) {&lt;br /&gt;        print "$h\n";&lt;br /&gt;        for my $s (sort(keys %{$data{$h}})) {&lt;br /&gt;            print "\t$s = $data{$h}-&gt;{$s}\n";&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here is some example output.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;14&lt;br /&gt;        200 = 48812&lt;br /&gt;        206 = 2&lt;br /&gt;        302 = 31807&lt;br /&gt;        304 = 11926&lt;br /&gt;        400 = 2462&lt;br /&gt;        404 = 2122&lt;br /&gt;        416 = 1&lt;br /&gt;        503 = 339&lt;br /&gt;15&lt;br /&gt;        200 = 40747&lt;br /&gt;        206 = 3&lt;br /&gt;        302 = 24270&lt;br /&gt;        304 = 9157&lt;br /&gt;        400 = 2637&lt;br /&gt;        404 = 2021&lt;br /&gt;        500 = 2&lt;br /&gt;        503 = 399&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-7095058052895396870?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wtlMjYGFwvHZBVsUsBzyVUFLyYk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wtlMjYGFwvHZBVsUsBzyVUFLyYk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wtlMjYGFwvHZBVsUsBzyVUFLyYk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wtlMjYGFwvHZBVsUsBzyVUFLyYk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/agiGm-YlkBI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/7095058052895396870/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/02/perl-throw-away-apache-http-status.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/7095058052895396870?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/7095058052895396870?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/agiGm-YlkBI/perl-throw-away-apache-http-status.html" title="Perl throw-away: Apache HTTP status codes count by hour." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/02/perl-throw-away-apache-http-status.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEFSXc8fyp7ImA9Wx9UFEk.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-6429755191359657667</id><published>2011-02-11T12:00:00.002-06:00</published><updated>2011-02-11T12:06:58.977-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-11T12:06:58.977-06:00</app:edited><title>HP-UX noob warning about /var/adm/sw/save</title><content type="html">If &lt;i&gt;/var&lt;/i&gt; is full or nearly full on any HP-UX systems, do not remove anything from the directory &lt;i&gt;/var/adm/sw/save&lt;/i&gt; using &lt;b&gt;rm&lt;/b&gt;.  The only appropriate method of freeing space from this particular directory is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# cleanup  -c  1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And reply &lt;b&gt;y&lt;/b&gt; to the prompt.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have no idea why, I'm just blindly following an HP-UX coworker's advice.  If you want to know more, then &lt;b&gt;man cleanup&lt;/b&gt;, obviously.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-6429755191359657667?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6LKjquNA5zdwBAZOdHXC-X7vRIU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6LKjquNA5zdwBAZOdHXC-X7vRIU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6LKjquNA5zdwBAZOdHXC-X7vRIU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6LKjquNA5zdwBAZOdHXC-X7vRIU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/Pu8TWfnai-U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/6429755191359657667/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2011/02/hp-ux-noob-warning-about-varadmswsave.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/6429755191359657667?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/6429755191359657667?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/Pu8TWfnai-U/hp-ux-noob-warning-about-varadmswsave.html" title="HP-UX noob warning about /var/adm/sw/save" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2011/02/hp-ux-noob-warning-about-varadmswsave.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQAQHozfyp7ImA9WhZTE0o.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-4056239966524816590</id><published>2010-12-18T19:03:00.006-06:00</published><updated>2011-03-17T09:49:01.487-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-17T09:49:01.487-05:00</app:edited><title>Xcode creates MainMenu.nib in new project even in version 3.2.5.</title><content type="html">Xcode is creating a MainMenu.nib file instead of a MainMenu.xib file when you select &lt;em&gt;File | New Project&lt;/em&gt;. Your Xcode version is 3.2.5 (more or less). This should not be happening. It should be creating XIB files so you can check in Interface Builder files into SCM.&lt;br /&gt;&lt;br /&gt;Why is it doing this? You probably upgraded from some old version of Xcode from some old version of OS X. I originally started on Tiger (10.4), and have upgraded straight into Snow Leopard (10.6). There is cruft left from the old installation from years back. Delete these files under &lt;em&gt;/Developer/Library/Xcode/Project Templates/Application/Cocoa Application/Cocoa Application&lt;/em&gt;. &lt;strong&gt;Notice the dates!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: smaller"&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Oops!  Except for &lt;em&gt;TemplateChooser.plist&lt;/em&gt;, which has a date in the year 2010.  Don't delete that!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_sPq5Jgvkr7E/TQ1YybSirbI/AAAAAAAAAk0/uIBJ5k7e-Oo/s1600/Screen+shot+2010-12-13+at+6.08.01+AM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_sPq5Jgvkr7E/TQ1YybSirbI/AAAAAAAAAk0/uIBJ5k7e-Oo/s1600/Screen+shot+2010-12-13+at+6.08.01+AM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://discussions.info.apple.com/thread.jspa?threadID=2427790"&gt;This thread on Apple support discussions&lt;/a&gt; is what lead me to this solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-4056239966524816590?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r0dGV2yR8VipKSOTPMmoQOYzvE0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r0dGV2yR8VipKSOTPMmoQOYzvE0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r0dGV2yR8VipKSOTPMmoQOYzvE0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r0dGV2yR8VipKSOTPMmoQOYzvE0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/lgrn2XzR-n4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/4056239966524816590/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/12/xcode-creates-mainmenunib-in-new.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/4056239966524816590?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/4056239966524816590?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/lgrn2XzR-n4/xcode-creates-mainmenunib-in-new.html" title="Xcode creates MainMenu.nib in new project even in version 3.2.5." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_sPq5Jgvkr7E/TQ1YybSirbI/AAAAAAAAAk0/uIBJ5k7e-Oo/s72-c/Screen+shot+2010-12-13+at+6.08.01+AM.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/12/xcode-creates-mainmenunib-in-new.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMDRn05eip7ImA9Wx9RF00.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-9169836335184468578</id><published>2010-12-18T15:14:00.004-06:00</published><updated>2010-12-18T15:24:37.322-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-18T15:24:37.322-06:00</app:edited><title>Cocoa: +keyPathsForValuesAffecting&lt;Key&gt; lowercase letter mistake.</title><content type="html">When you use KVO and create your class method with a name matching the pattern +keyPathsForValuesAffecting&amp;lt;Key&amp;gt; don't forget to capitalize the first letter of the "Key" part.&lt;br /&gt;
&lt;br /&gt;
It might seem obvious to me now, especially with that uppercase "K" in "Key", but all my keys start with a lowercase letter, not uppercase (in keeping with Apple style guidelines), and the &lt;a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueObserving_Protocol/Reference/Reference.html%23//apple_ref/occ/clm/NSObject/keyPathsForValuesAffectingValueForKey:"&gt;KVO Protocol Reference&lt;/a&gt; documentation does not call out the uppercase letter requirement. This particular warning is buried within the &lt;a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/DependentKeys.html%23//apple_ref/doc/uid/20002179-BAJEAIEE"&gt;KVO Programming Guide&lt;/a&gt;, instead.&lt;br /&gt;
&lt;br /&gt;
Good:&lt;br /&gt;
&lt;pre&gt;+ (NSSet *)keyPathsForValuesAffectingAmountInOtherCurrency {
 return [NSSet setWithObjects: @"dollarsToConvert", @"exchangeRate", nil];
}
&lt;/pre&gt;&lt;br /&gt;
Bad:&lt;br /&gt;
&lt;pre&gt;+ (NSSet *)keyPathsForValuesAffectingamountInOtherCurrency {
 return [NSSet setWithObjects: @"dollarsToConvert", @"exchangeRate", nil];
}
&lt;/pre&gt;&lt;br /&gt;
Yes, the bad version even looks bad, so I guess I should have figured that out faster.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-9169836335184468578?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TbYTlYFFE1qyXNn0heXfpFfj_dI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TbYTlYFFE1qyXNn0heXfpFfj_dI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TbYTlYFFE1qyXNn0heXfpFfj_dI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TbYTlYFFE1qyXNn0heXfpFfj_dI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/PFWPCv2wOns" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/9169836335184468578/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/12/cocoa-keypathsforvaluesaffecting.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/9169836335184468578?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/9169836335184468578?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/PFWPCv2wOns/cocoa-keypathsforvaluesaffecting.html" title="Cocoa: +keyPathsForValuesAffecting&amp;lt;Key&amp;gt; lowercase letter mistake." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/12/cocoa-keypathsforvaluesaffecting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4BRHczfyp7ImA9Wx9RFE8.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-8962892597321362328</id><published>2010-12-15T07:52:00.003-06:00</published><updated>2010-12-15T10:02:35.987-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-15T10:02:35.987-06:00</app:edited><title>Perl throw-away script: netstat report on a certain port.</title><content type="html">SYN* means a connection is opening.  *WAIT means a connection is closing.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;&lt;br /&gt;use Getopt::Std;&lt;br /&gt;&lt;br /&gt;our %opt;&lt;br /&gt;getopt('p', \%opt);&lt;br /&gt;&lt;br /&gt;my $port = 80;&lt;br /&gt;if (exists $opt{'p'}) {&lt;br /&gt;    $port = $opt{'p'};&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;my @lines = qx{ /usr/bin/netstat -an };&lt;br /&gt;&lt;br /&gt;my %status;&lt;br /&gt;&lt;br /&gt;for my $line (@lines) {&lt;br /&gt;    my @fields = split /\s+/, $line;&lt;br /&gt;&lt;br /&gt;    next if !exists $fields[3];&lt;br /&gt;    next unless $fields[0] =~ /^tcp/;&lt;br /&gt;&lt;br /&gt;    if ($fields[3] =~ /\.$port$/) {&lt;br /&gt;        $status{$fields[-1]}++;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;my $total;&lt;br /&gt;for my $key (keys %status) {&lt;br /&gt;    print "$key = $status{$key}\n";&lt;br /&gt;    $total += $status{$key};&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;print '-' x 15 . "\n";&lt;br /&gt;print "total = $total\n";&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Example of running it:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;me@mybox:/~&lt;br /&gt;$ ./netstat_port_report.pl -p 8054&lt;br /&gt;CLOSE_WAIT = 1&lt;br /&gt;FIN_WAIT_2 = 166&lt;br /&gt;ESTABLISHED = 148&lt;br /&gt;LISTEN = 1&lt;br /&gt;---------------&lt;br /&gt;total = 316&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-8962892597321362328?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZF97iJbdAB703gowoYjNMQTMLHI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZF97iJbdAB703gowoYjNMQTMLHI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZF97iJbdAB703gowoYjNMQTMLHI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZF97iJbdAB703gowoYjNMQTMLHI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/Dv0tdnY-fJI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/8962892597321362328/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/12/perl-throw-away-script-netstat-report.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8962892597321362328?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8962892597321362328?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/Dv0tdnY-fJI/perl-throw-away-script-netstat-report.html" title="Perl throw-away script: netstat report on a certain port." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/12/perl-throw-away-script-netstat-report.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YFQHw6fCp7ImA9Wx9RFE8.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-8274553950199747639</id><published>2010-11-25T16:37:00.008-06:00</published><updated>2010-12-15T07:51:51.214-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-15T07:51:51.214-06:00</app:edited><title>Perl one-liner: checking Listen ports on Apache HTTP configuration files.</title><content type="html">You stumble upon an installation of Apache HTTP Server that has a few configuration files. You want to do a quick visual inspection of their &lt;em&gt;Listen&lt;/em&gt; directives to check for conflicts.&lt;br /&gt;&lt;br /&gt;This will also help you find if any &lt;em&gt;Listen&lt;/em&gt;s are duplicated within a single file. See port 443 in foo_httpd.conf.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;jbm@Foucault:~/tmp/conf$ perl -mData::Dumper -ane '$f{$ARGV}-&amp;gt;{$F[1]}++ if /^\s*Listen/; END { print Data::Dumper::Dumper(\%f);}' *conf&lt;br /&gt;$VAR1 = {&lt;br /&gt;          'bar_httpd.conf' =&amp;gt; {&lt;br /&gt;                                '94' =&amp;gt; 1,&lt;br /&gt;                                '494' =&amp;gt; 1&lt;br /&gt;                              },&lt;br /&gt;          'admin.conf' =&amp;gt; {&lt;br /&gt;                            '8008' =&amp;gt; 1&lt;br /&gt;                          },&lt;br /&gt;          'blarf_httpd.conf' =&amp;gt; {&lt;br /&gt;                                  '8011' =&amp;gt; 1&lt;br /&gt;                                },&lt;br /&gt;          'foo_httpd.conf' =&amp;gt; {&lt;br /&gt;                                '90' =&amp;gt; 1,&lt;br /&gt;                                '443' =&amp;gt; 2,&lt;br /&gt;                                '80' =&amp;gt; 1,&lt;br /&gt;                                '490' =&amp;gt; 1&lt;br /&gt;                              },&lt;br /&gt;          'httpd.conf' =&amp;gt; {&lt;br /&gt;                            '80' =&amp;gt; 1&lt;br /&gt;                          }&lt;br /&gt;        };&lt;/pre&gt;&lt;br /&gt;Yes, this is a long way to type a &lt;strong&gt;grep&lt;/strong&gt; command, but I think the output lends itself more to visual inspection, which is what I'm after.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;jbm@Foucault:~/tmp/conf$ egrep '^[[:space:]]*Listen' *conf&lt;br /&gt;admin.conf:Listen 8008&lt;br /&gt;bar_httpd.conf:Listen 494&lt;br /&gt;bar_httpd.conf:Listen 94&lt;br /&gt;blarf_httpd.conf:Listen 8011&lt;br /&gt;foo_httpd.conf:Listen 90&lt;br /&gt;foo_httpd.conf:Listen 443&lt;br /&gt;foo_httpd.conf:Listen 80&lt;br /&gt;foo_httpd.conf:Listen 490&lt;br /&gt;foo_httpd.conf:Listen 443&lt;br /&gt;httpd.conf:Listen 80&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-8274553950199747639?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5zzFYCW_-zzvzdd76iNZOgD1bOc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5zzFYCW_-zzvzdd76iNZOgD1bOc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5zzFYCW_-zzvzdd76iNZOgD1bOc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5zzFYCW_-zzvzdd76iNZOgD1bOc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/AxYImSXFizM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/8274553950199747639/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/11/perl-one-liner-checking-listen-ports-on.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8274553950199747639?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8274553950199747639?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/AxYImSXFizM/perl-one-liner-checking-listen-ports-on.html" title="Perl one-liner: checking Listen ports on Apache HTTP configuration files." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/11/perl-one-liner-checking-listen-ports-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EHQHw6cSp7ImA9Wx9TGUs.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-1300606413438666203</id><published>2010-11-25T11:21:00.006-06:00</published><updated>2010-11-28T12:40:31.219-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-28T12:40:31.219-06:00</app:edited><title>What Sony PIIQ clip-on earbuds (Qlasp) look like when worn.</title><content type="html">Suppose you're in Target looking for new headphones for your iPod shuffle because your current behind-the-neck headphones get yanked out of your ears when you're doing push-ups and a few other exercises during your workout. You see what looks like a solution to your problem in the form of the Sony PIIQ™ clip-on earbuds (Qlasp™).&lt;br /&gt;
&lt;br /&gt;
However, because the design is so unique, you are in doubt about how to actually wear them, and you want to confirm your suspicions about the design of these things. So you pull out your iPhone/Android and Google™ for images of folks wearing them but are surprised to find no photos of people wearing them, not even on the Sony site.&lt;br /&gt;
&lt;br /&gt;
Problem solved.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_sPq5Jgvkr7E/TO6RxcDPW1I/AAAAAAAAAkk/4E-v-EsWrvQ/s1600/piiq_1-2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/_sPq5Jgvkr7E/TO6RxcDPW1I/AAAAAAAAAkk/4E-v-EsWrvQ/s320/piiq_1-2.jpg" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;Oh, right! Do they solve my problem? Well, I've stopped using my behind-the-neck headphones and exclusively use the PIIQ clip-ons.&lt;br /&gt;
&lt;br /&gt;
I have not done a scientific survey to see which earphones I mess with less while working out. However, I'm kind of fussy about that. A normal person would probably not fiddle as much as I.&lt;br /&gt;
&lt;br /&gt;
In general, I'd say that behind-the-neck phones are better for straight-out running (maybe, see below). PIIQ clip-on earbuds are better for the quasi-cardio strength training workout that I do when I'm not running. However, even on my runs, I do 22 push-ups and 22 leg lifts every mile, so I still wear my PIIQ clip-ons for my typical run.&lt;br /&gt;
&lt;br /&gt;
I think configuring the PIIQ clip-ons is key to their staying put during activity. During my last run, I used the smallest set of earbuds that came with the PIIQ, and I reset my left earbud only once during the 3 miles (and 66 push-ups, 44 leg lifts, 22 sit-ups). For reasons yet unknown, I could not setup my right ear like my left, so I reset that earbud a lot. There was some subtle positioning I seemed to be missing.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="clear: both;"&gt;Oops! I did not mean to turn this into a product review. I merely wanted to let other people know what these earbuds looked like while being worn. Here is another view from a slightly different angle.&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_sPq5Jgvkr7E/TO6a2Cto2YI/AAAAAAAAAko/YopjfI7ASRc/s1600/piiq_2-2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/_sPq5Jgvkr7E/TO6a2Cto2YI/AAAAAAAAAko/YopjfI7ASRc/s320/piiq_2-2.jpg" width="296" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-1300606413438666203?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VmFA_jZBn5-niIMoNY9c35Upa0c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VmFA_jZBn5-niIMoNY9c35Upa0c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VmFA_jZBn5-niIMoNY9c35Upa0c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VmFA_jZBn5-niIMoNY9c35Upa0c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/YkEnzIXRvQE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/1300606413438666203/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/11/what-sony-piiq-clip-on-earbuds-look.html#comment-form" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/1300606413438666203?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/1300606413438666203?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/YkEnzIXRvQE/what-sony-piiq-clip-on-earbuds-look.html" title="What Sony PIIQ clip-on earbuds (Qlasp) look like when worn." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_sPq5Jgvkr7E/TO6RxcDPW1I/AAAAAAAAAkk/4E-v-EsWrvQ/s72-c/piiq_1-2.jpg" height="72" width="72" /><thr:total>9</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/11/what-sony-piiq-clip-on-earbuds-look.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YASHo6fCp7ImA9Wx9TEkw.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-8745783455658434591</id><published>2010-11-19T08:51:00.012-06:00</published><updated>2010-11-19T17:59:09.414-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-19T17:59:09.414-06:00</app:edited><title>Perl one-liner: getting sorted fingerprint list from keytool.</title><content type="html">I need to determine which X.509 certificates in one Java keystore are missing from another.  I do this by comparing fingerprints.  Here is how I get a sorted list of fingerprints from one keystore.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;me@mybox:/usr/ibm_java/jre/lib/security&lt;br /&gt;$ keytool -list -keystore cacerts -storepass changeit &amp;gt;~/keytool.out&lt;br /&gt;me@mybox:/usr/ibm_java/jre/lib/security&lt;br /&gt;$ cd ~&lt;br /&gt;me@mybox:~&lt;br /&gt;$ perl -ane '$f{$F[-1]}++ if /fingerprint/; END {for $k (sort {$a &amp;lt;=&amp;gt; $b} keys %f) {print "$k\n";}}' &amp;lt;keytool.out &amp;gt;fingerprints.list&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I do this to both keystores.&lt;br /&gt;&lt;br /&gt;Once I've got my list of fingerprints from each file, I get a list of fingerprints that are in one file, but not another.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;me@mybox:~&lt;br /&gt;$ diff fingerprints_123.list fingerprints.list | perl -ane 'print "$F[-1]\n" if /^&amp;gt;/' &amp;gt;diff_fingerprints.list&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then I wrote this script to read the list of missing fingerprints and tell me the aliases that correspond to these fingerprints in the keystore that has them.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;&lt;br /&gt;# 1st arg = file with list of missing fingerprints.&lt;br /&gt;# 2nd arg = file with keytool output from keystore with additional certs.&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use warnings;&lt;br /&gt;use Data::Dumper;&lt;br /&gt;&lt;br /&gt;# Slurp up all the missing fingerprints.&lt;br /&gt;open my $want_fh, '&amp;lt;', $ARGV[0] or die;&lt;br /&gt;my @wanted = &amp;lt;$want_fh&amp;gt;;&lt;br /&gt;chomp @wanted;&lt;br /&gt;close $want_fh;&lt;br /&gt;&lt;br /&gt;my $previous;   # Previous line of keytool.out.&lt;br /&gt;my %data;       # Key = fingerprint, value = line prior to fingerprint.&lt;br /&gt;&lt;br /&gt;# Populate %data with all relevant keytool output from file with additional certs.&lt;br /&gt;open my $data_fh, '&amp;lt;', $ARGV[1] or die;&lt;br /&gt;while (&amp;lt;$data_fh&amp;gt;) {&lt;br /&gt;    chomp;&lt;br /&gt;    if (/fingerprint/) {&lt;br /&gt;        $data{(split(/\s/, $_))[-1]} = $previous;&lt;br /&gt;    }&lt;br /&gt;    $previous = $_;&lt;br /&gt;}&lt;br /&gt;close $want_fh;&lt;br /&gt;&lt;br /&gt;#print Dumper(\%data);&lt;br /&gt;&lt;br /&gt;# Find hash key in %data for each item in @wanted, and print the previous keytool output line.&lt;br /&gt;for my $finger (@wanted) {&lt;br /&gt;        print "$data{$finger}\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;exit 0;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now that I think about it, I should have just written this as one bigger script instead of two one-liners and a script plus miscellaneous temp files.  Oh, well.  I'll do that another day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-8745783455658434591?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DOXAJALEtX3vMrcPVy7u_c8VjYY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DOXAJALEtX3vMrcPVy7u_c8VjYY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DOXAJALEtX3vMrcPVy7u_c8VjYY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DOXAJALEtX3vMrcPVy7u_c8VjYY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/pUc7pPWxasg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/8745783455658434591/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/11/perl-one-liner-getting-sorted.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8745783455658434591?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/8745783455658434591?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/pUc7pPWxasg/perl-one-liner-getting-sorted.html" title="Perl one-liner: getting sorted fingerprint list from keytool." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/14948861488878036693</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/11/perl-one-liner-getting-sorted.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cBQXsyeSp7ImA9Wx5aEEg.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-5133912004403721534</id><published>2010-11-06T10:56:00.001-05:00</published><updated>2010-11-06T10:57:30.591-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-06T10:57:30.591-05:00</app:edited><title>Perl one-liner: which directories do I need to restore?</title><content type="html">I just ran an automatic process on a directory much higher up in the file system hierarchy than I wanted. Specifically, I accidentally did a Subversion Import on /Users from Xcode SCM dialog.&lt;br /&gt;
&lt;br /&gt;
I can't just do a blanket restore starting at that top level directory. Specifically, Time Machine won't let me restore /Users. I quit Xcode shortly into the operation, and I need to know which subdirectories got hit so I can restore those.&lt;br /&gt;
&lt;br /&gt;
How to do this?  Do a &lt;b&gt;find&lt;/b&gt; on which files were modified, then parse the output.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;jbm@Foucault:~
$ sudo find /Users -mmin -15 -ls &amp;gt;/tmp/screwup.list 2&amp;gt;&amp;amp;1
&lt;/pre&gt;&lt;br /&gt;
&lt;pre&gt;jbm@Foucault:~
$ perl -ane '$p{join(" ", (split("/", $F[10]))[1..4])}++; END {for $i (keys %p) {print "$i\n";}}' /tmp/screwup.list 
Users jbm Library Preferences
Users jbm Library Application
Users jbm Code CoreDataTutorial
Users jbm Code MyApp
Users jbm Library Cookies
Users jbm Code Build
Users jbm Code SVN
Users jbm Library Caches
Users jbm Library Safari
Users jbm Code
Users jbm .DS_Store
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-5133912004403721534?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vDGwWkq8cmoIJzJ9jXI9xycI90A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vDGwWkq8cmoIJzJ9jXI9xycI90A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vDGwWkq8cmoIJzJ9jXI9xycI90A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vDGwWkq8cmoIJzJ9jXI9xycI90A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/xefktWcfB7A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/5133912004403721534/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/11/perl-one-liner-which-directories-do-i.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/5133912004403721534?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/5133912004403721534?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/xefktWcfB7A/perl-one-liner-which-directories-do-i.html" title="Perl one-liner: which directories do I need to restore?" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/11/perl-one-liner-which-directories-do-i.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUNQ3c9eyp7ImA9Wx5UFkQ.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-7390785944459601383</id><published>2010-10-21T14:44:00.000-05:00</published><updated>2010-10-21T14:44:52.963-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-21T14:44:52.963-05:00</app:edited><title>Perl one-liner: listing command line arguments one line at a time.</title><content type="html">You know how Java application servers have loads of command line arguments? And every once in a while you want to list all those arguments one line at a time?&lt;br /&gt;
&lt;br /&gt;
In other words, you want a perl version of using tr to change spaces to newlines.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;ps -ef | grep appServerName | tr '[:space:]' '[\n*]'
&lt;/pre&gt;&lt;br /&gt;
Here is one way.  This lends itself to extending the one-liner for processing the args in some way via &lt;i&gt;@F&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;ps -ef | perl -lane 'print join("\n", @F) if $F[-1] =~ /appServerName/'
&lt;/pre&gt;&lt;br /&gt;
Here is another.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;ps -ef | perl -ne 'next unless /appServerName/; s/\s+/\n/g; print;'
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-7390785944459601383?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8IfnhzMKHP0Cj0Ohba1XhTKqu2w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8IfnhzMKHP0Cj0Ohba1XhTKqu2w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8IfnhzMKHP0Cj0Ohba1XhTKqu2w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8IfnhzMKHP0Cj0Ohba1XhTKqu2w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/lX7HAdp4sME" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/7390785944459601383/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/10/perl-one-liner-listing-command-line.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/7390785944459601383?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/7390785944459601383?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/lX7HAdp4sME/perl-one-liner-listing-command-line.html" title="Perl one-liner: listing command line arguments one line at a time." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/10/perl-one-liner-listing-command-line.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYFRn06fSp7ImA9Wx5UFkU.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-7214974822606278846</id><published>2010-10-21T11:55:00.000-05:00</published><updated>2010-10-21T11:55:17.315-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-21T11:55:17.315-05:00</app:edited><title>Amoebae and anthropomorphism.</title><content type="html">&lt;a href="http://www.cs.utexas.edu/users/EWD/transcriptions/EWD09xx/EWD936.html"&gt;http://www.cs.utexas.edu/users/EWD/transcriptions/EWD09xx/EWD936.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Just saving this link for later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-7214974822606278846?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qi2UYjr4tGJ4K2k2rIT7YT_hJWs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qi2UYjr4tGJ4K2k2rIT7YT_hJWs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qi2UYjr4tGJ4K2k2rIT7YT_hJWs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qi2UYjr4tGJ4K2k2rIT7YT_hJWs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/wlshvuode20" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/7214974822606278846/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/10/amoebae-and-anthropomorphism.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/7214974822606278846?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/7214974822606278846?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/wlshvuode20/amoebae-and-anthropomorphism.html" title="Amoebae and anthropomorphism." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/10/amoebae-and-anthropomorphism.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08FRX04eSp7ImA9Wx5UFko.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-4627403563395340007</id><published>2010-10-21T10:43:00.001-05:00</published><updated>2010-10-21T10:43:34.331-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-21T10:43:34.331-05:00</app:edited><title>Perl one-liner: a process is communicating with which hosts (using lsof)?</title><content type="html">You want to know which hosts that a process is communicating with.  You use lsof.  You want a Perl one-liner to parse the output nicely for you.&lt;br /&gt;
&lt;br /&gt;
In the below example, the PID of the process I am observing is 1114114.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;lsof -p 1114114 -a -i TCP -P | perl -ane '$h{(split(":", (split("-&amp;gt;", $F[-2]))[-1]))[0]}++ if /ESTABLISHED/; END {for $i (keys %h) {print "$i = $h{$i}\n";}}'
&lt;/pre&gt;&lt;br /&gt;
Example output:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;bob.example.com = 6
lemon.example.com = 12
smart100.example.com = 60
smart101.example.com = 8
windows.example.com = 2
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-4627403563395340007?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/V7HTTT_fTbCFPNU7RyYYgk0JG4Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V7HTTT_fTbCFPNU7RyYYgk0JG4Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/V7HTTT_fTbCFPNU7RyYYgk0JG4Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V7HTTT_fTbCFPNU7RyYYgk0JG4Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/lXYa5L_hl5E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/4627403563395340007/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/10/perl-one-liner-process-is-communicating.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/4627403563395340007?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/4627403563395340007?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/lXYa5L_hl5E/perl-one-liner-process-is-communicating.html" title="Perl one-liner: a process is communicating with which hosts (using lsof)?" /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/10/perl-one-liner-process-is-communicating.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEBQH0yfip7ImA9Wx5VEUg.&quot;"><id>tag:blogger.com,1999:blog-6938084522763168330.post-6801220488743488706</id><published>2010-10-03T20:10:00.000-05:00</published><updated>2010-10-03T20:10:51.396-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-03T20:10:51.396-05:00</app:edited><title>Personal Note: NSOperation and NSOperationQueue and atomicity.</title><content type="html">I may need to review this later.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.friday.com/bbum/2008/01/13/objectivce-c-atomic-properties-threading-andor-custom-settergetter/"&gt;bbum's weblog-o-mat entry about atomicity, properties, and threading.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Main point I'm getting: don't have two threads (NSOperations) operating on the same instance variables of the same object unless you really, really must, and if you're still thinking you do, then you're probably wrong.&lt;br /&gt;
&lt;br /&gt;
Oh, and &lt;i&gt;atomic&lt;/i&gt; != &lt;i&gt;thread-safe&lt;/i&gt; != &lt;i&gt;syncronized&lt;/i&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6938084522763168330-6801220488743488706?l=it-nonwhizzos.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fDgO7EJ8gpJBaB7bW-Izaiy1XK8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fDgO7EJ8gpJBaB7bW-Izaiy1XK8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fDgO7EJ8gpJBaB7bW-Izaiy1XK8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fDgO7EJ8gpJBaB7bW-Izaiy1XK8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ItNon-whizzos/~4/rhr5Xn3Dfrg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://it-nonwhizzos.blogspot.com/feeds/6801220488743488706/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://it-nonwhizzos.blogspot.com/2010/10/personal-note-nsoperation-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/6801220488743488706?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938084522763168330/posts/default/6801220488743488706?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ItNon-whizzos/~3/rhr5Xn3Dfrg/personal-note-nsoperation-and.html" title="Personal Note: NSOperation and NSOperationQueue and atomicity." /><author><name>Jeffery</name><uri>http://www.blogger.com/profile/00233184554785130203</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="33" height="29" src="http://2.bp.blogspot.com/_sPq5Jgvkr7E/S4Mk1NesCzI/AAAAAAAAAis/oGAZVKHWjTQ/S220/me_hat.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://it-nonwhizzos.blogspot.com/2010/10/personal-note-nsoperation-and.html</feedburner:origLink></entry></feed>

