Here in Alabama, USA we’ve just acquired the new area code “256″ which means that some lucky (and probably unappreciative) bastard will get
+1-256-512-1024
Which has simply got to be the coolest damn phone number I can imagine.
– David McNettCan i dial 1-255-255-255255 and make every phone in the world ring?
– Tanuki
I’ve been using Gmail since the invite only beta, my first received email was 6/15/04, and overall I have 8353 emails stored, which means that:
I am currently using 896 MB (19%) of 4647 MB.
Not bad, wish Google tracked the amount of spam I’ve gotten in that time frame. What does everyone else’s account look like?
I got tired of all the crappy security updates that I needed to apply to my Drupal site, so I deleted the whole thing and installed DokuWiki. I’ll be filling it out slowly over the next couple of years. Feel free to add something to it.
Discovered that the bash shell has a variable called $RANDOM, which outputs a pseudo-random number every time you call it. Sweet! Allowed me to randomize the lines in a file for a process I needed to do, thusly:
for i in `cat unusual.txt`; do echo “$RANDOM $i”; done | sort | sed -r ’s/^[0-9]+ //’ > randorder.txt
In other words, put a random number on every line, sort the file, then take off the random numbers. Worked like a charm.
Had a bit of hardware trouble, with a hard drive failing today. However, due to my sysadmin ninja skills, no data was lost and the RAID 1 is rebuilding.
[root@nexus ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hdc1[2] hda1[0]
79360960 blocks [2/1] [U_]
[>....................] recovery = 2.2% (1809408/79360960) finish=25.9min speed=49725K/sec
md0 : active raid1 hdc2[1] hda2[0]
1052160 blocks [2/2] [UU]
unused devices:
If you need to do this:
# dd if=/dev/hda of=/dev/hdc bs=512 count=1
# mdadm –manage /dev/md0 –add /dev/hdc2
# mdadm –manage /dev/md1 –add /dev/hdc1
In other words, copy the master boot record from the good drive to the new drive so you have the same partitions, then hot add the new partitions to your array. WARNING DANGER DANGER WARNING. Backup all your data first, and test your backups work. Change the partitions and drives to match your own situation. Failure to do so will cause you to hose your system… That is all.
Now if only Linux could do all this automatically like other sane operating systems.
Update: I’m getting a little suspicious that just copying the MBR from one hard drive to another, messed up something with Linux’s software RAID. Sigh. This is exactly how I would do it in Solaris, but Linux has no great documentation on how to do it easily. Lazyweb?
Update, 2 Aug 2008:
I did this again and this time realized that copying the MBR will work fine with DD, but Linux needs to be explicitly told to rescan the partition table. I simply opened up the device with fdisk, checked the partitions looked how I wanted and then rewrote the partition table. Fdisk then calls the IOCTL to tell the kernel to rescan the partitions. Problem solved.
# uname -a
Darwin Matt Michie’s iPhone 9.0.0d1 Darwin Kernel Version 9.0.0d1: Fri Jun 22 00:38:56 PDT 2007; root:xnu-933.0.1.178.obj~1/RELEASE_ARM_S5L8900XRB iPhone1,1 Darwin
# python
Python 2.5.1 (r251:54863, Jul 27 2007, 12:05:57)
[GCC 4.0.1 LLVM (Apple Computer, Inc. build 2.0)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
Mmmmm tasty! iPhone with SSH, Python, BSD subsystem. Life is good.
Surprisingly, the upgrade went pretty smoothly. While dinking around in the admin section, I noticed:
Akismet has protected your site from 15,874 spam comments.
Man, I hate spammers. The more popular my domains get, the more they get targeted. One of my other sites was used as a forged from address in a bunch of e-mails and I got all the bounces. Thanks for checking SPF everyone.
Update:
Ugh! Damn it.
WordPress database error: [Table 'wp_post2cat' doesn't exist]
SELECT cat_ID AS ID, MAX(post_modified) AS last_mod FROM `wp_posts` p LEFT JOIN `wp_post2cat` pc ON p.ID = pc.post_id LEFT JOIN `wp_categories` c ON pc.category_id = c.cat_ID WHERE post_status = ‘publish’ GROUP BY cat_IDWordPress database error: [Table 'wp_post2cat' doesn't exist]
SELECT cat_ID AS ID, MAX(post_modified) AS last_mod FROM `wp_posts` p LEFT JOIN `wp_post2cat` pc ON p.ID = pc.post_id LEFT JOIN `wp_categories` c ON pc.category_id = c.cat_ID WHERE post_status = ‘publish’ GROUP BY cat_ID
Yes, I ran the update which supposedly updated my DB. Lovely.
Update 2:
Apparently I need to update my Google Sitemaps plugin as found in this thread: http://wordpress.org/support/topic/135564
VMWare VProbes (dtrace for all)
software, system administration, troubleshooting, virtualization No Comments »Keith Adams has an intriguing post about VMWare vprobes:
VProbes attempts to provide a set of tools for answering the question, “What the heck is this computer doing?” It’s an open-ended question, so vprobes is accordingly open-ended, as well. In its current form, it provides an interactive, safe way of instrumenting a running VM at any level: from user-level processes down to the kernel, and even into VMware’s VMM and hypervisor, if need be.
First, we are aiming to provide a Dtrace-like tool for other commercially important operating systems than Solaris. Second, VProbes can combine with other virtualization-based techniques in powerful ways. For example, VProbes and deterministic replay combine to make the most potent tool that I’m aware of for debugging intermittent performance anomalies.
Stumbled across a great list of “alternate” terms for Monkey Patching in Ruby:
My Complete List Of Substitute Names For The Maneuver We Now Know To Be Monkeypatching


Recent Comments