Monday, May 14, 2018
Thursday, May 13, 2010
Xen DomU hanging at "Checking for hardware changes"? Check your xenconsoled in your Dom0.
This is the second time this has happened to me, so I'm writing to you, my future self, a quick note so you don't have to relearn this a second time.
If when restarting a DomU, the DomU hangs at "Checking for hardware changes", check on the Dom0 to see if your xenconsoled has died. If so, restart it (ie. /usr/sbin/xenconsoled) and it should immediately fix the hanging DomUs.
This guy has a blog post with same issue, but I don't think he ever figured it out because he took a scorched-earth route to fix the problem. However, it does have a nice screen shot of what the hung DomU looks like.
Yours truely,
yourself
Saturday, February 27, 2010
Monday, February 01, 2010
Stupidity, brought to you by the letter L

I grabbed some time formatting code from an older project of mine to use in my current project.
However, I noticed that the constants defined at the top of the class had some weird values. The constant, number of milliseconds per whatever, was ending in a 1 instead of a 0. My first thought was that a co-worker had mangled my source to fix some stupid off-by-one time issue they were having, incidentally breaking everything else that relied on that constant.
While 600 to 601 is a plausible change, 60 milliseconds per minute to 600 milliseconds per minute should have set off alarm bells in my head.
I spent several minutes grepping through the svn repository trying to find the lazy rat-bastard that had messed with my code, only to find that it wasn't a '601' but a '60l' (60L). The L is there to force the value into a long integer type.
Lesson learned? Use uppercase L.
Monday, December 21, 2009
Funny phishing / spam email I got
Spam / phishing emails are a dime a dozen, but this one was so funny I had to post it.
Washington Field Office Banner with FBI Seal linking to FBI Home
Anti-Terrorist and International Fraud Division.
Federal Bureau Of Investigation.
Seattle, Washington.
Telephone Number : (206) 973-2572
ATTN: BENEFICIARY
This is to Officially inform you that it has come to our notice and we have thoroughly completed an Investigation with the help of our Intelligence Monitoring Network System that you legally won the sum of $800,000.00 US Dollars from a Lottery Company outside the United States of America. During our investigation we discovered that your e-mail won the money from an Online Balloting System and we have authorized this winning to be paid to you via a Certified Cashier's Check.
Normally, it will take up to 10 business days for an International Check to be cashed by your local bank. We have successfully notified this company on your behalf that funds are to be drawn from a registered bank within the United States Of America so as to enable you cash the check instantly without any delay, henceforth the stated amount of $800,000.00 US Dollars has been deposited with Bank Of America.
We have completed this investigation and you are hereby approved to receive the winning prize as we have verified the entire transaction to be Safe and 100% risk free, due to the fact that the funds have been deposited at Bank Of America you will be required to settle the following bills directly to the Lottery Agent in-charge of this transaction whom is located in Lagos, Nigeria. According to our discoveries, you were required to pay for the following -
(1) Deposit Fee's ( Fee's paid by the company for the deposit into an American Bank which is - Bank Of America )
(2) Cashier's Check Conversion Fee ( Fee for converting the Wire Transfer payment into a Certified Cashier's Check )
(3) Shipping Fee's ( This is the charge for shipping the Cashier's Check to your home address and this fee includes Insurance )
The total amount for everything is $300.00 (Five Hundred-US Dollars). We have tried our possible best to indicate that this $300.00 should be deducted from your winning prize but we found out that the funds have already been deposited at Bank Of America and cannot be accessed by anyone apart from you the winner, therefore you will be required to pay the required fee's to the Agent in-charge of this transaction via Western Union Money Transfer Or Money Gram.
In order to proceed with this transaction, you will be required to contact the agent in-charge ( BENSON EDWARD) via e-mail. Kindly look below to find appropriate contact information:
CONTACT AGENT NAME: MR. BENSON EDWARD
E-MAIL ADDRESS: bensonedward200@gala.net
Telephone Number : +234-813-822-3603
You will be required to e-mail him with the following information:
FULL NAME:
ADDRESS:
CITY:
STATE:
ZIP CODE:
AGE/SEX:
DIRECT CONTACT NUMBER:
You will also be required to request Western Union details on how to send the required $300.00 in order to immediately ship your prize of $800,000.00 US Dollars via Certified Cashier's Check drawn from Bank Of America, also include the following transaction code in order for him to immediately identify this transaction : EA2948-910.
This letter will serve as proof that the Federal Bureau Of Investigation is authorizing you to pay the required $300.00 ONLY to Mr. Benson Edward via information in which he shall send to you, if you do not receive your winning prize of $800,000.00 US Dollars we shall be held responsible for the loss and this shall invite a penalty of $3,000 which will be made PAYABLE ONLY to you (The Winner).
Please find below an authorized signature which has been signed by the FBI Director- Robert Mueller, also below is the FBI NSB (National Security Branch) seal.
FBI Director
Robert Mueller.
NSB Seal
Authorized Signature
NSB SEAL ABOVE
NOTE: In order to ensure your check gets delivered to you ASAP, you are advised to immediately contact Mr. BENSON EDWARD via contact information provided above and make the required payment of $300.00 to information in which he shall provide to you.
Wednesday, June 24, 2009
Don't use Integer keys with WeakHashMap
public void testWeakHashMapWithIntKeys()
{
WeakHashMap<integer, stringbuffer> map = new WeakHashMap<integer, stringbuffer>();
map.put( 1, new StringBuffer("Test 1") );
map.put( 2, new StringBuffer("Test 2") );
map.put( 3, new StringBuffer("Test 3") );
map.put( 126, new StringBuffer("Test 126") );
map.put( 127, new StringBuffer("Test 127") );
map.put( 128, new StringBuffer("Test 128") );
System.out.println(map);
System.gc();
System.out.println(map);
}
{128=Test 128, 126=Test 126, 127=Test 127, 3=Test 3, 2=Test 2, 1=Test 1}
{126=Test 126, 127=Test 127, 3=Test 3, 2=Test 2, 1=Test 1}
Friday, May 08, 2009
Friday, April 24, 2009
Phone bill fraud from "Internet Business Assocation" and ESBI (Enhanced Services Billing, Inc)
IBA also provides our customers with a unique auto-created web space on the Internet utilizing state-of-the-art technology and a vibrant and vast collection of artwork to improve their visual presence on the Internet, all for only $39.95 per month, conveniently billed on their local telephone bill so that there are not even additional checks to write for the small businesses we work with
Thursday, March 05, 2009
Found bug in Sun's Java Swing implementation (?)
if (key == "enabled")From the inline comments in the source, its a hack to synchronize the action's boolean enabled status with putValue("enabled", true/false) which stores the value in a map.
Monday, September 08, 2008
Animating favicon the hard way
Unfortunately, you have jump thru a few hoops. Just changing your link's href tag won't do anything:
$("link").get(0).href = "newicon.ico";You also have to remove the <link> tag from the dom and re-add it:
function setFavIcon( src )
{
var link = $('link').get(0);
var linkparent = link.parentNode;
link.href = src;
$(link).remove();
$(linkparent).append(link);
}
Thursday, June 19, 2008
Finally!!!! I get my very own nigerian 419 buddy.
Well, I finally got an email from someone that was interested! Yeah me!
From: "chuksbrown@ommail.com"
To: sale-722302282@craigslist.org
Subject: Sony 200 disc cd player --- CDP-CX70ES - $45 (New Market)
Date: Tue, 17 Jun 2008 03:38:07 -0500
** CRAIGSLIST ADVISORY --- AVOID SCAMS BY DEALING LOCALLY
** Avoid: wiring money, cross-border deals, work-at-home
** Beware: cashier checks, money orders, escrow, shipping
** More Info: http://www.craigslist.org/about/scams.html
I need to know your firm price,
kindly get back to me.
THANKS.
____________________________________________________
S Naidu Online Web Designing, Domain Name Registration, Web Hosting, Email Solutions,
Ecommerce website development, http://www.snaidu.com
I replied back that I wasn't willing to reduce the price anymore:
Date: Tue, 17 Jun 2008 09:45:03 -0400
From: "Trevor Harrison"
To: "chuksbrown@ommail.com"
Subject: Re: Sony 200 disc cd player --- CDP-CX70ES - $45 (New Market)
Sorry. I already specified my price... $45. If you're just a little
short of that I'll deal with you, but I've already reduced the price
on this quite a bit.
-Trevor
He replied:
Delivered-To: trevor@harrison.org
From: "chuksbrown@ommail.com"
To: "Trevor Harrison"
Subject: Re: Sony 200 disc cd player --- CDP-CX70ES - $45 (New Market)
Date: Tue, 17 Jun 2008 11:54:55 -0500
Alright, i will pay you the amount you said and i hope it
is in good condition.I'm in london presently but on a
busSiness trip,i would have love to come and pick it up
myself so as to check if it is in good shape,but since i'm
not in town, i will pay you through paypal or money
order,but you will have to do me a favour.I would like the
Sony 200 disc cd player sent to my only daughter as a
birthday gift.She is only 20 and works with the UNICEF in
west Africa. You will ship it to her after confirmation of
money is seen.Thanks.
Well, darn. He wants me to ship it to Africa for him. A old, kinda big cd player. My guess is that shipping would be much more than the listed price. But I'm sure I can trust that money order he says he'll send me.
Its kinda weird. This is my first 419 buddy. I feel happy to finally have one, but I'm wondering what I've been doing wrong that its taken 13 years to finally get one.
Thursday, May 29, 2008
Friday, June 22, 2007
Another favorite quote from David Brin's Earth
Dear Net-Mail User [ EweR-635-78-2267-3 aSp]:You mailbox has just been rifled by EmilyPost, an autonomous courtesy-worm chain program released in October 2036 by an anonymous group of net subscribers in western Alaska. [ ref: sequestered confession 592864 -2376298.98634, deposited with Bank Leumi 10/23/36:20:34:21. Expiration-disclosure 10 years.] Under the civil disobedience sections of the Charter of Rio, we accept in advance the fines and penalties that will come due when our confession is released in 2046. However we feel that's a small price to pay for the message brought to you by EmilyPost.
In brief, dear friend, you are not a very polite person. EmilyPost's syntax analysis subroutines show that a very high fraction of your net exchanges are heated, vituperative, even obscene.
Of course you enjoy free speech. But EmilyPost has been designed by people who are concerned about the recent trend toward excessive nastiness in some parts of the net. EmilyPost homes in on folks like you and begins by asking them to please consider the advantages of politeness.
For one thing, your credibility ratings would rise. (EmilyPost has checked your favorite bulletin boards, and finds your ratings aren't high at all. Nobody is listening to you, sir!) Moreover, consider that courtesy can foster calm reason, turning shrill antagonism into useful debate and even consensus.
We suggest introducing an automatic delay to your mail system. Communications are so fast these days, people seldom stop and think. Some net users act like mental patients who shout out anything that comes to mind, rater than as functioning citizens with the human gift of tact.
If you wish, you may use one of the public-domain delay programs including in the version of EmilyPost, free of charge.
Of course, should you insist on continuing as before, disseminating nastiness in all directions, we have equipped EmilyPost with other options you'll soon find out about...
One of my favorite quotes from David Brin's Earth
I sometimes wonder what animals think of the phenomenon of humanity -- and especially of human babies. For no creature on the planet must seem anywhere near so obnoxious.A baby screams and squalls. It urinates and defecates in all directions. It complains incessantly, filling the air with demanding cries. How human parents stand it is their own concern. But to great hunters, like lions and bears, our infants must be horrible indeed. They must seem to taunt them, at full volume.
"Yoo-hoo, beasteis!" babies seem to cry. "Here's a toothsome morsel, utterly helpless, soft and tender. But I needn't keep quiet like the young of other species. I don't crouch silently and blend in with the grass. You can track me by my noise or smell alone, but you don't dare!
"Because my mom and dad are the toughest, meanest sumbitches ever seen, and if you come near, they'll have your hide for a rug."
All day they scream, all night they cry. Surely if animals ever held a poll, they'd call human infants the most odious of creatures. In comparison, human adults are merely very, very scary.
--Jen Wolling, from The Earth Mother Blues, Globe Books, 2032. [hyper access 7-tEAT-687-56-1237-65p.]
Earth, David Brin
Thursday, May 31, 2007
Google street maps easter egg
Wednesday, May 30, 2007
Image archiving and digitizing
I acquired a Nikon film / slide scanner, and began to work on the mountain of slides. And soon lost interest and stopped.
Recently, my mom made several pointed comments to me about finishing the job, or returning the slides so she can do it. Of course, my ego wouldn't allow for that, so I've been trying to finish scanning these things.
Today I just finished scanning another 100-slide carousel. I'm saving the slides as tiff images, and each file is about 67M. (5782 x 3946 pixels)
On average, each carousel is going to take about 6700M (or about 6G). To back these pictures up, and distribute to the family, I've been burning them on DVDs (and down-sized sets to CDs).
The cool thing about scanning all these slides is that I can literally see the difference quality makes. Some of the slides are on generic drug-store film-de-jour, and some is on Kodak Kodachrome. The Kodachrome slides have retained their colors much better than the other slides, and are much sharper when scanned.
Which got me to thinking about longevity of my digital images. These film prints are about 50 years old, and some of them (the Kodachrome) look great. I really doubt all my digital camera photos are going to last for 50 years on a CD or DVD disc.
I'm starting to think that converting my digital images to film might be the best way to go. Doing a google search for "print slides from digital pictures", you can find lots of companies offering digital->film services. From a quick perusal, $2.00 seems to be the ballpark per slide.
Now all I have to do is figure out what I'm going to do with my .avi movie clips from my camera. Super-8? :-)
Friday, May 11, 2007
Searching for common bugs
Its a simple error to make:
if ( s == "" )
{
foo();
}
Correct usage would be
if ( s.equals( "" ) )
{
foo();
}
The tricky thing is that the first (incorrect) usage will work a surprisingly large percentage of the time.
Most strings will be empty because they were initialized to "" somewhere, rather than the result of a string operation that returned an empty string:
s.substring( s.length() ) // returns an empty string
Being initialized to the constant "" means that s will be pointing to the same jvm object that will be used in the equality comparison in the first if() statement.
Anyway, here is a link to the results of a code search for == ""
google code search for == ""
Interestingly enough, some of the first hits are valid uses of == "" (at least from their comments), because the string was interned first before being used in the comparison.
Monday, October 30, 2006
Halloween costume for baby
You know that soft spot on top of a baby's head (the fontanelle)? Ok, hold that picture in your mind.
You've seen those mylar drink pouches with a straw that you punch thru a prepared opening?
Ok. Imagine a baby costume where the baby is a drink pouch, with just their head sticking out, and a nice big straw protruding from their fontanelle.
The baby-drink-pouch should be labeled something like "Fresh Baby Brains!".
I hesitate to try to depict this with my limited photoshop skills. I just regret not doing it last year with our newborn.
Thursday, September 28, 2006
Betting on my daugter's future
The first column is the item, the second column is how I bet, the third column is how my wife bet, and the last column is how it actually turned out.
As some of the items might take awhile before being determined, I will update this post with the new info.
| Item | Me | Wife | Actual |
| weight at birth | 6.5 lbs | 6.5 lbs | 6 lbs 10 ozs |
| head of hair at birth | y | y | y |
| handedness | left | right | right |
| height at age 18 | 5' 9" | ||
| eye color | green | green | brown |
| first word | avast or ahoy | mom / mama | |
| favorite parent | me | both | |
| first parent puked on | her | me | her |
| first parent to drop child | me | me | |
| likes liver | no | yes |
[added May 20, 2007, but occurred Sept 28, 2006]
[update 12/21/2009] right handed [/update]
Friday, September 16, 2005
Fun with domain registrar namesecure
Date: 9/16/2005 2:00PM EST (ish)
My original problem report via the namesecure website:
on 9/16/2005, at 2:00pm EST, I noticed an outage with our domain names that are being served by dns(1,2).namesecure.com
Please fix this asap!
dig @64.62.166.88 www.mydomain.net
; <<>> DiG 9.2.5 <<>> @64.62.166.88 www.mydomain.net
; (1 server found)
;; global options: printcmd
;; connection timed out; no servers could be reached
However, the nameserver isn't completely unresponsive:
# dig @64.62.166.88 www.namesecure.com
; <<>> DiG 9.2.5 <<>> @64.62.166.88 www.namesecure.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4989
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;www.namesecure.com. IN A
;; ANSWER SECTION:
www.namesecure.com. 86400 IN CNAME namesecure.com.
namesecure.com. 86400 IN A 64.62.166.106
;; AUTHORITY SECTION:
namesecure.com. 86400 IN NS dns1.namesecure.com.
namesecure.com. 86400 IN NS dns2.namesecure.com.
;; ADDITIONAL SECTION:
dns1.namesecure.com. 86400 IN A 64.62.166.88
dns2.namesecure.com. 86400 IN A 206.169.98.34
;; Query time: 164 msec
;; SERVER: 64.62.166.88#53(64.62.166.88)
;; WHEN: Fri Sep 16 14:06:55 2005
;; MSG SIZE rcvd: 136
Date: 9/16/2005 2:30PM EST (ish)
About 30 minutes later the problem went away and my domain names started resolving again
Date: 9/19/2005 3:45PM EST
Namesecure's reply
Dear Trevor Harrison,
Thank you for contacting NameSecure Support. We are focused on delivering quality customer service and to addressing the issues you are having.
The website for mydomain.net is resolving. We apologize for any inconvenience you have experienced.
We hope this information has been helpful. For inquiries regarding this matter, please reply to this e-mail address (support@namesecure.com) and reference Service Request # XXXXXXXXXXX. For all other issues, please contact us via our online form at http://www.namesecure.com/support.
Sincerely,
Brent S.
The NameSecure Team
Date: 9/20/2005 9:23AM EST
Ok, here's my reply:
Yes, it is resolving now, but for at least 30 minutes it wasn't resolving on either dns1 or dns2 of your nameservers. (nothing was resolving on your nameservers except for namesecure.com itself) That's BOTH of your nameservers, effectively down at the same time. That's unacceptable. Please give me a reason for this lapse.
-Trevor
Date: 9/22/2005 11:28AM EST
Namesecure's reply
Dear Trevor Harrison,
Thank you for contacting NameSecure Support. We are focused on delivering quality customer service and to handling requests quickly and efficiently.
Your issue has been escalated to the technical service delivery team.
As soon as we have resolved your issue(s) we will notify you via e-mail. Issues are typically resolved within 2 to 3 business days.
We hope this information has been helpful. For inquiries regarding this matter, please reply to this e-mail address (support@namesecure.com) and reference Service Request # YYYYYYYYY. For all other issues, please contact us via our online form at http://www.namesecure.com/support.
Sincerely,
Jeffrey M.
NameSecure Support
support@namesecure.com
www.namesecure.com
Finally! Moving up the feeding chain to someone who knows what they are doing.
Date: 9/27/2005 2:41PM EST
Namesecure's followup
Dear Trevor Harrison,
I am aware of no issues with the servers that would have caused your website to be unavailable. Please specify the date and time and I will escalate the issue to one of our hosting administrators and have it investigated.
If you have additional questions please contact us at www.namesecure.com/support between 9 a.m. and 6 p.m. EST Monday-Friday.
Thank you for choosing NameSecure!
Sincerely,
Christine001
The NameSecure Team
Date: 9/27/2005 2:54PM EST
Really? Sarcasm fails me.
My reply:
I specified the date and time in the original report. Do you need it again?
I've attached a copy of my original report to this message. [1]
Also, I would like to be put in touch with your supervisor to discuss the quality of the responses I receive.
-Trevor
[1] I've learned to keep copies of my original report since your system doesn't have any method to review the history.
Date: 10/3/2005 1:21PM EST
Namesecure's followup
Dear Trevor Harrison,
Thank you for contacting NameSecure Support. We are focused on delivering quality customer service and to handling requests quickly and efficiently.
Your issue has been escalated to the technical service delivery team.
As soon as we have resolved your issue(s) we will notify you via e-mail. Issues are typically resolved within 2 to 3 business days.
We hope this information has been helpful. For inquiries regarding this matter, please reply to this e-mail address (support@namesecure.com) and reference Service Request # ZZZZZZZZZZZ. For all other issues, please contact us via our online form at http://www.namesecure.com/support.
Sincerely,
Jarvis S.
NameSecure Support
support@namesecure.com
www.namesecure.com
Date: 10/4/2005 12:06PM EST
Namesecure's followup
Dear Trevor Harrison,
The website for mydomain.net appears to be resolving correctly at this time.
If you have additional questions please contact us at www.namesecure.com/support between 9 a.m. and 6 p.m. EST Monday-Friday.
Thank you for choosing NameSecure!
Sincerely,
Christine
The NameSecure Team
Date: 10/4/2005 3:39PM EST
My reply
Are you joking? Or are you some robot who's only response is "the website for ${domainame} appears to be resolving at this time"?
Please answer all of my issues. Not just the ones that you can brush off by deliberately misunderstanding the question.
-Trevor
Date: 10/7/2005 11:11AM EST
Namesecure's reply
Dear Trevor Harrison,
We are truly sorry but we are not aware of any downtime in the past few weeks, but it is possible the servers where taken off line for a brief period of time for maintenance, it is possible that there where other servers down in the network, there are many possibilities and we can pinpoint the issue if it is already corrected by the time we process your request.
If you have additional questions please contact us at www.namesecure.com/support between 9 a.m. and 6 p.m. EST Monday-Friday.
Thank you for choosing NameSecure!
Sincerely,
Christine001
The NameSecure Team
Date: 10/7/2005 11:44AM EST
My reply
Other than the fact that your reply doesn't really parse well (did you have a typo or forget a 'not' or "can't" in there somewhere?), I think I understand what you are saying about your service: customer outages of less than 2-3 business days (your standard response on your turn around time) aren't important enough to be discussed because the problem has already been fixed by the time you get around to the problem report.
However, I'm getting frustrated with you ignoring parts of my email that aren't convient. You still haven't giving me any contact info for your supervisor, or at least told me to go jump in a lake.
Just for the comedy of our conversation over the last few weeks regarding this issue, I've turned it into a thread on a webpage that you can browse:
http://www.harrison.org/~trevor/namesecurefun.html
-Trevor
Date: 10/18/2005 1:23PM EST
Namesecure's reply
Dear Trevor Harrison,
The issue with the down time could not be pinpointed it may or may not have been something within our system or within a system outside of our control, meaning backbone providers, rootzones updates, etc. For this reason there is a disclaimer of warranties which can be found in our service agreement located at http://www.namesecure.com/en_US/index.jhtml?cat=agreementi&subCat=null.
If you have additional questions please contact us at www.namesecure.com/support between 9 a.m. and 6 p.m. EST Monday-Friday.
Thank you for choosing NameSecure!
Sincerely,
Christine001
The NameSecure Team
