A little corner of the Empire on the web.

20 December, 2006

ServiceCenter/Firefox Printing Redux

Some may remember this post from back in July when I was having trouble printing from a web app after upgrading from Firefox 1.0x to Firefox 1.5. Wherein I laid out a way to fix the problem using a custom usercontent.css file, and also logged a bug on the Mozilla Bugzilla system.

Well it looks like its come to an end! Not with today's Firefox update, as you might imagine. But the latest 'Minefield' (Firefox 3 alpha) builds have the new "reflow" changes (from Dbaron's bug 30030) in them.

And it works!!

So now we just need to wait for Firefox 3's release and the whole world can feel the love!

08 November, 2006


Thanks are due to Colin Murray's Black Hole on his Radio 1 show just now.

He's introduced me to definitely the night's greatest song, almost certainly the week's greatest and quite possibly the year's. Well I've had it on repeat for quite a while now and haven't grown sick anyway :)

If you were lucky enough to listen to the show live, or were quick enough to listen to it from the Black Hole's web page, then you obvisouly know that I'm talking about…

Jay-Zeezer's 99 Luft Problems

Yes, that is Nena you've cunningly detected in the track name. Yes it is a mashup. Yes Jay-Z is involved (unfortunately perhaps, but hell, it works here).

Now shoo, shoo. Go download!

25 September, 2006

Active Directory Group Membership Queries

The problem with being known as the person who can pull a list of group members from AD into a text file in a few seconds, you become a "go-to guy" for other AD queries. Which wouldn’t be such a bad thing, except that there aren't pre-written scripts for them all! I received a request today to ask if I could pull out a list from AD of everyone who was a member of both a departmental group and a security group, here's how I did it.

List the Members of an AD Group

For anyone who doesn't know already, there are a couple of easy ways that I know of to print a list of the members of one active directory group to a text file:

The "Command Line One-Liner"

As always with something that looks simple you need to put in a little work first, this time it’s very easy. First download the very useful psExec utility from the Sysinternals website. This handy little tool lets you run commands on a remote machine as if you're logged directly onto it. Extract that and save it somewhere, preferably in your path.

Now all you need are a few bits of information that you should already know if you’re thinking of running this sort of query: the name of a domain controller on your network, and the username and password of an ID that has admin rights on that DC (unless your normal login account has these rights, in which case you really ought to do a security review ;-) ).

Then run the following command from a command prompt:

psexec \\domain_controller -u domain_slash_userid -p password net group "group name"

This will list all of the group members to the command prompt, to redirect this output to a text file, just add "> c:\temp\groupmembers.txt" to the end, eg:

psexec \\domain_controller -u domain_slash_userid -p password net group "group name" > c:\temp\groupmembers.txt

The VBScript (or Perl) Method

Go to the Active Directory Cookbook's Source Code page and download Script 7.2 "Viewing the direct members of a group" in VBScript format (or Perl if you have Perl installed and are more comfy reading that).

Save the script somewhere, open it up in Notepad and replace the <groupdn> bit with the path to your group. Now change to a command line and run either:
"cscript View_Group_members.vbs" (for the VBScript version) or
"perl View_Group_members.pl" (for the Perl version)

While it is possible to just double-click either file in Explorer to run them, you don’t want to do that; the VBScript version will pop up an alert box on screen for each group member (meaning if you have a group with 100 members, you’ll get 100 alerts on your screen one after the other, each one wanting you to click OK), whereas the Perl version will dump its output to the command line then close the window before you have time to read it. So drop to a command line to run them.

If you want to send the output to a text file then (as above) just append a right facing angle bracket and the name of a text file, eg: cscript View_Group_members.vbs > c:\temp\groupmembers.txt perl View_Group_members.pl > c:\temp\groupmembers.txt

Listing Everyone Who is Both a Member of Group A and Group B

(intersection of groups A and B)

Now listing everyone who is a member of both Group A and Group B is slightly more difficult, and I couldn't find a script online that pulls that out for you - so I wrote one myself. This is a Perl script as I've known Perl for years, and whilst I can read simple VBScript fairly well I wouldn't want to try writing it. So if you want to run it you’ll need to have a version of Perl installed, I can recommend ActiveState’s ActivePerl (see below for download instructions).

This is an adaptation of the above Perl script (http://rallenhome.com/books/adcookbook/src/07.02-view_group_membership.pls.txt for anyone who hasn't downloaded it yet) that pulls out the members of the two groups, hashes them, then prints the intersection to the command line.

The fine print at the bottom of the Cookbook's source code page seems to suggest that it’s ok to modify and distribute the code as long as the acknowledgement and citation are kept intact. So you can click to download my "Viewing the intersection of members of two groups".

Note 1: Downloading ActivePerl

(Note to self: see also Kbase 1027070447)

27 July, 2006

Unisys ServiceCenter Firefox printing fix

For anyone still living in Unisys-land (aren't I glad they're not filling out my wage slip any more smile ), and for anyone else forced to use their "idiosyncratic" (read shite) web tools here's a little something.

If you've been forced to use the web (ie HTML not Java) version of their (Peregrine-based) ServiceCenter tool, you'll notice that its dog-slow if you're using IE and has a whole myriad of intermittent problems. The obvious, and really quite effective, solution is to use Firefox. This speeds up ServiceCenter measurably and seems to get around most of the other problems.

Or at least it used to. Firefox v1.0 to v1.08 all work absolutely perfectly, but Firefox 1.5 introduced one teeny-weeny and yet show-stopping printing bug that stops you from being able to print any useful info from ServiceCenter (technical details here in Mozilla bug 326162 if you're interested). Unfortunately according to the recent Firefox 2 beta release it doesn't look like it'll be fixed in Firefox 2 when that's released , and checking Firefox trunk (the ongoing work to create the not even alpha yet Firefox 3) the bug actually looks even worse at the moment.

So after reading this page on creating your own "user stylesheets" in Mozilla and this page that mentions a new experimental CSS rule, I put two and two together and actually came up with four for once!

So here's how to get Unisys ServiceCenter printing correctly in Firefox versions 1.5 and newer:

  • Download a recent version of Firefox
  • Run it
  • Close it
  • Find your Firefox profile folder (see here if you can't find your profile folder, and bear in mind that your profile may be in a Windows network roaming profile, or may be on your C drive).
  • Inside your Firefox profile folder look in the "Chrome" folder
  • Do you have a file in there called "userContent.css"? If so, open that file in Notepad, if not create a new text file with that name and then open it in Notepad.
  • Paste the following text into the "userContent.css" file:
    /* Fix b0rked ServiceCenter printing in Firefox 1.5+
    see Mozilla Bug 326162 https://bugzilla.mozilla.org/show_bug.cgi?id=326162 */
    @-moz-document domain(www.sc-ps.unisys.com){
    div.labl, div.val { overflow:visible !important; } }
  • Save the file
  • Open Firefox
  • Re-visit ServiceCenter and try printing a ticket out
  • Send me thanks, adoration, first-born children, money or just leave me a comment below saying how it worked out for you (actually forget the first-born children I wouldn't have a clue what to do with them).

One final note, Unisys have been known to change the server these web apps are on periodically, if so you need to edit the bit that says domain(www.sc-ps.unisys.com) to reflect the new server name. This may or may not work for other company's Peregrine web interfaces, may be broken at some point in the future by an upgrade to the website or to FIrefox, YMMV). Also this Mozilla bug may be fixed at some point in the future, so at that point you can safely delete the above lines from Firefox's userContent.css.

09 May, 2006

At last they're mine!

Remember way back when when I entered the MSN World's Best App competition with my Connect Four game?

Remember just a few months back when the winners were announced?

Well... my second place prizes have (finally) arrived! I'm currently playing around with my Oakley Thump sunnies, loading them up with music and looking just slightly silly :).

Also included in the prize is a nice, shiny copy of MS Visual Studio 2005 Pro (worth more than the rest of the package put together) and every Oakley Thump accessory available (but one). Its like Christmas came in May!

Looks like I'm going to be wearing my sunnies everywhere I go for the next week or two come rain or shine.

Just gotta finish by saying W00t new goggles! Thank you Microsoft!.

06 February, 2006

Maximum w00tage!

So MSN just announced the winners of their World's Best App contest today (or maybe late yesterday, can't do these timezone calculations in my head

Have a look down the list of winners, see that game in 2nd place called Connect Four? I made that

Edit 11/2/06:
Looks like its official! The official "Inside Windows Live Messenger" blog has just posted an article on Messenger’s Worlds Best App Contest Winners.

01 February, 2006

The most useful tool ever?

Microsoft XML Diff and Patch 1.0

Alright, maybe its a bit of an exageration, but this really did save my bacon the other day, and it is very useful if its what you need and things are formatted badly enough that WinDiff can't help you.

31 January, 2006

This entry has been brought to you by the letters "C" and "N", and the feeling of pain

Chuck Norris v Bruce Lee in 'Way of the Dragon'
  1. Chuck Norris' tears cure cancer. Too bad he has never cried.
  2. Chuck Norris does not sleep. He waits.
  3. Chuck Norris does not hunt because the word hunting infers the probability of failure. Chuck Norris goes killing.
  4. Chuck Norris counted to infinity - twice.
  5. Chuck Norris sold his soul to the devil for his rugged good looks and unparalleled martial arts ability. Shortly after the transaction was finalized, Chuck roundhouse kicked the devil in the face and took his soul back. The devil, who appreciates irony, couldn't stay mad and admitted he should have seen it coming. They now play poker every second Wednesday of the month.
  6. When the Boogeyman goes to sleep every night he checks his closet for Chuck Norris.
  7. Mary had a little lamb. Then Chuck Norris ate it.
  8. If you can see Chuck Norris, he can see you. If you can't see Chuck Norris you may be only seconds away from death.
  9. Chuck Norris is a God-fearing man. Unfortunately, God is a Chuck Norris-fearing god.
  10. The Dinosaurs looked at Chuck Norris the wrong way once. ONCE.
  11. Chuck Norris is currently suing NBC, claiming Law and Order are trademarked names for his left and right legs.
  12. The chief export of Chuck Norris is pain.
  13. When Chuck Norris sends in his taxes, he sends blank forms and includes only a picture of himself, crouched and ready to attack. Chuck Norris has not had to pay taxes ever.
  14. Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid of the dark, but the dark is afraid of Chuck Norris
  15. Chuck Norris built a time machine and went back in time to stop the JFK assassination. As Oswald shot, Chuck met all three bullets with his beard, deflecting them. JFK's head exploded out of sheer amazement.
  16. Chuck Norris has already been to Mars; that's why there are no signs of life there.
  17. Chuck Norris is not hung like a horse... horses are hung like Chuck Norris
  18. If at first you don't succeed, you're obviously not Chuck Norris.
  19. If Chuck Norris is late, time better slow the fuck down.
  20. As a teen Chuck Norris impregnated every nun in a convent tucked away in the hills of Tuscany. Nine months later the nuns gave birth to the 1972 Miami Dolphins, the only undefeated and untied team in professional football history.
  21. They once made a Chuck Norris toilet paper, but it wouldn't take shit from anybody.
  22. A blind man once stepped on Chuck Norris' shoe. Chuck replied, "Don't you know who I am? I'm Chuck Norris!" The mere mention of his name cured this man's blindness. Sadly the first, last, and only thing this man ever saw, was a fatal roundhouse delivered by Chuck Norris.
  23. Chuck Norris' penis is so large that it actually warps the fabric of space-time. Indeed some physicists now theorise that the passage of time is mearly a byproduct of Norris' colossal erections. This is known as the "Chuck Norris' big cock theory of space-time".
  24. Someone once tried to tell Chuck Norris that roundhouse kicks aren't the best way to kick someone. This has been recorded by historians as the worst mistake anyone has ever made.
  25. When Chuck Norris was in middle school, his English teacher assigned an essay: "What is Courage?" Chuck Norris received an "A+" for writing only the words "Chuck Norris" and promptly turning in the paper.
  26. Chuck Norris doesn't read books. He stares them down until he gets the information he wants.
  27. Chuck Norris died ten years ago, but the Grim Reaper can't get up the courage to tell him.
  28. Every time Chuck Norris smiles it saves the life of a dying man. Ironically, Chuck Norris only smiles after he kills someone.
  29. Chuck Norris does not teabag the ladies. He potato-sacks them.
  30. Chuck Norris lost his virginity before his dad did.
  31. While riding the elevator, Chuck Norris never pushes the button, the elevator better just know what floor Chuck Norris needs to be on.
  32. Chuck Norris frequently donates blood to the Red Cross. Just never his own.
  33. To prove it isn't that big of a deal to beat cancer. Chuck Norris smoked 15 cartons of cigarettes a day for 2 years and aquired 7 different kinds of cancer only to rid them from his body by flexing for 30 minutes. Beat that, Lance Armstrong.
  34. Superman owns a pair of Chuck Norris pajamas.
  35. At birth, Chuck Norris came out feet first so he could roundhouse kick the doctor in the face. Nobody delivers Chuck Norris but Chuck Norris
  36. When an episode of Walker Texas Ranger was aired in France, the French surrendered to Chuck Norris just to be on the safe side.
  37. Chuck Norris can touch MC Hammer.
  38. Before he forgot a gift for Chuck Norris, Santa Claus was real.
  39. Chuck Norris ordered a Big Mac at Burger King, and got one.
  40. According to Einstein's theory of relativity, Chuck Norris can actually roundhouse kick you yesterday.
  41. Chuck Norris' action figure has slept with more women then most men.
  42. The quickest way to a man's heart is with Chuck Norris's fist.
  43. Chuck Norris appeared in the "Street Fighter II" video game, but was removed by Beta Testers because every button caused him to do a roundhouse kick. When asked bout this "glitch," Norris replied, "That's no glitch."
  44. Chuck Norris doesn't use pickup lines, he simply says, "Now."
  45. Chuck Norris owns the greatest Poker Face of all-time. It helped him win the 1983 World Series of Poker despite him holding just a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO.
  46. Chuck Norris' hand is the only hand that can beat a royal flush.
  47. A Handicap parking sign does not signify that this spot is for handicapped people. It is actually in fact a warning, that the spot belongs to Chuck Norris and that you will be handicapped if you park there.
  48. Chuck Norris once ate three 72 oz. steaks in one hour. He spent the first 45 minutes having sex with his waitress.
  49. Chuck Norris clogs the toilet even when he pisses.
  50. Chuck Norris
  51. The grass is always greener on the other side, unless Chuck Norris has been there. In that case the grass is most likely soaked in blood and tears.
  52. Chuck Norris once ate a whole cake before his friends could tell them there was a stripper in it.
  53. Filming on location for Walker: Texas Ranger, Chuck Norris brought a stillborn baby lamb back to life by giving it a prolonged beard rub. Shortly after the farm animal sprang back to life and a crowd had gathered, Chuck Norris roundhouse kicked the animal, breaking its neck, to remind the crew once more that Chuck giveth, and the good Chuck, he taketh away.
  54. Once a grizzly bear threatened to eat Chuck Norris. Chuck showed the bear his fist and the bear proceeded to eat himself, because it would be the less painful way to die.
  55. Oxygen requires Chuck Norris to live.
  56. Chuck Norris invented the spoon because using knives to kill people was just too easy.
  57. Similar to a Russian Nesting Doll, if you were to break Chuck Norris open you would find another Chuck Norris inside, only smaller and angrier.
  58. Most reported Bigfoot sightings are just Chuck Norris with his shirt off. Loch Ness sightings, on the other hand, are Chuck with his pants off.
  59. Chuck Norris has a word for a person he puts into a coma; that word is "lucky".
  60. Chuck Norris can unscramble an egg.
  61. Cars were invented to have a faster way of fleeing from Chuck Norris. Not to be outdone, Chuck Norris invented the car accident.
  62. A recent poll discovered 93% of women think about Chuck Norris during sex. A similar poll discovered Chuck Norris thinks about Chuck Norris 100% of the time during sex.
  63. Chuck Norris is 1/8th Cherokee. This has nothing to do with ancestry, the man ate a fucking Indian.
  64. Chuck Norris can make a woman climax by simply pointing at her and saying "booya".
  65. Don't even bother. Chuck Norris already did it. Better.
  66. Chuck Norris likes to knit sweaters in his free time. And by "knit", I mean "kick", and by "sweaters", I mean "babies".
  67. Chuck Norris called 911 one time in his life, just to hear his new ring tone.
  68. Chuck Norris doesn't have to do anything for a Klondike bar.
  69. Bullets dodge Chuck Norris.
  70. It was once believed that Chuck Norris actually lost a fight to a pirate, but that is a lie, created by Chuck Norris himself to lure more pirates to him. Pirates never were very smart.
  71. Chuck Norris does not know about this site. Otherwise he would have deleted the internet.
  72. Chuck Norris does not urinate. He actually scares the piss out of himself.
  73. Chuck Norris is like a dog, not only because he can smell fear, but because he can piss on whatever the fuck he wants.
  74. A man was once stranded on the side of the road after his car ran out of gas. Chuck Norris drove by, got out, and looked the man in the eye. The man knew that everything would be fine. Then Chuck proceeded to piss into the man's gas tank and to this very day that man has never had to fill his gas tank up again. That was 14 years ago.
  75. Chuck Norris can eat soup with a fork.
  76. Chuck Norris knew what Willis was talking about and killed Gary Coleman for his blatant ignorance of the fact.
  77. Chuck Norris was the fourth Wiseman. He brought baby Jesus the gift of "beard". Jesus wore it proudly to his dying day. The other Wisemen, jealous of Jesus' obvious gift favoritism, used their combined influence to have Chuck omitted from the Bible. Shortly after all three died of roundhouse kick related deaths.
  78. If you ask Chuck Norris what time it is, he always says, "Two seconds till." After you ask, "Two seconds to what?" he roundhouse kicks you in the face.
  79. Chuck Norris can divide by zero.
  80. After much debate, President Truman decided to drop the atomic bomb on Hiroshima rather than the alternative of sending Chuck Norris. His reasoning? It was more "humane".
  81. One time in an airport a guy accidently called Chuck Norris "Chick Norris". He explained it was an honest mistake and apologized profusely. Chuck accepted his apology and politely signed an autograph. Nine months later, the guy's wife gave birth to a bearded baby. The guy knew exactly what had happened, and blames nobody but himself.
  82. Chuck Norris doesn't have to stop bullets becuase they know better.
  83. Chuck Norris can eat a Rubix Cube and poop it out solved.
  84. Chuck Norris, Vin Diesel and Arnold Schwarzenegger have all died and are in Heaven. Each of them hope to occupy the seat next to God. God asks Vin Diesel why he thinks he should have the seat and Vin replies, "I believe... I should have the seat because of the virtuosity in my toughness and pride." Arnie says, "I believe... that I should be the one sitting next to you because of all my achievements." God then turns to Chuck Norris, who replies with, "I believe... you are sitting in my seat."
  85. Chuck Norris once bet NASA he could survive re-entry without a spacesuit. On July 19th, 1999, a naked Chuck Norris re-entered the earth's atmosphere, streaking over 14 states and reaching a temperature of 3000 degrees. An embarrassed NASA publically claimed it was a meteor, and still owes him a beer.
  86. Chuck Norris always has sex on the first date. Always.
  87. There's no such thing as a tornado. Chuck Norris just hates trailer parks.
  88. Achilles was supposedly the greatest warrior of all time, but he died because of his weak spot, the Achilles tendon. There is no Chuck Norris tendon.
  89. Chuck Norris's girlfriend once asked him how much wood a woodchuck could chuck if a woodchuck could chuck wood. He then shouted, "HOW DARE YOU RHYME IN THE PRESENCE OF CHUCK NORRIS!" and ripped out her throat. Holding his girlfriend's bloody throat in his hand he bellowed, "Don't fuck with Chuck!" Two years and five months later he realized the irony of this statement and laughed so hard that anyone within a hundred mile radius of the blast went deaf.
  90. Heart disease may be the new leading cause of death in women age 45 to 65, but Chuck Norris is still the leading cause of death in men age 0 to 125.
  91. On Neil Armstrong's second step on the moon, he found a note that said, "Chuck Norris was here."
  92. Anyone can piss on the bathroom floor, but Chuck Norris can shit on the ceiling.
  93. Every dinosaur skull ever found has the imprint of a size 15 cowboy boot on its jaw. Scientists are baffled, but we know damn well why.
  94. Chuck Norris challenged a statue to a staring contest. Chuck remains undefeated.
  95. Before each filming of Walker: Texas Ranger, Chuck Norris is injected with five times the lethal dose of elephant tranquilzer. This is, of course, to limit his strength and mobility, in an attempt to lower the fatality rate of the actors he fights.
  96. Jesus's Birthday isn't December 25 but Chuck Norris once sent him a birthday card for that day, Jesus was too scared to tell Chuck the truth. Thats why we celebrate Christmas
  97. Chuck Norris was going to spend a relaxing day watching television when one of those commercials for Trix cereal came on. Angered by what he saw, Chuck Norris spent the rest of his, what was supposed to be a relaxing day, punching every child he came across. He would then shout at them, "Trix are for Chuck Norris."
  98. There are two kinds of people in this world: People who are Chuck Norris, and people who are going to die.
  99. According to the Laws of Physics, it is impossible for Chuck Norris to build more muscle. Upon realizing this, Chuck Norris swiftly roundhouse kicked every Law of Physics known to man, as well as those known only by Chuck Norris. He now has the ability to will His muscles to any level of strength He desires at any given time.
  100. If Chuck Norris were a calendar, every month would be named Chucktober, and every day he'd kick your ass.
  101. Fear is not the only emotion Chuck Norris can smell. He can also detect hope, as in "I hope I don't get a roundhouse kick from Chuck Norris."
  102. The easiest way to determine Chuck Norris' age is to cut him in half and count the rings.
  103. When the movie Pulp Fiction was filmed they had to borrow Chuck Norris's wallet... It's the one that says "Bad Mother Fucker" on it.
  104. When Chuck Norris says "More cowbell", he really MEANS it.
  105. Chuck Norris shot the sheriff, but he round house kicked the deputy.
  106. Chuck Norris invented the internet… just so he had a place to store his porn.

Thanks to QQQQ's Chuck Norris Fact Generator, have a look there for any new facts!