Deleting old IIS Log Files

I was looking for an easy way to create a task to delete log files based on date for one of our IIS servers. The server gets thousands of hits an hour because of an information dashboard which is hosted on it. The logs aren’t important because they’re all internal and if it’s less than 7 days old we don’t care anyhow.

Based on information in the Technet forums, I ran the following command:

[Read More]

Windows 7 Enterprise – Explorer not loading under RunAs command

This will stop the mechanism that launches explorer.exe from always launching it as the current interactive user - which can cause all sorts of weird issues.

Run the registry editor as administrator and edit the below key:

HK_CLASSES_ROOT\AppID{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}\RunAs

to

HK_CLASSES_ROOT\AppID{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}_RunAs

You will likely have to take ownership of that registry key before you can modify it, as by default, only TrustedInstaller can modify it.

  1. Right click on the folder,
  2. click permissions.
  3. Click on “advanced” and then the owner tab.
  4. Click your name/something you have security access to and tick the “Replace all child objects…” box.
  5. Click apply and then you should be good to go.

This might need a reboot or two. If you get a box like the below and you work with me, you’re in the wrong OU. Other people - group policy might be broken.

[Read More]

Power monitoring sneak peek

 

So, I’m playing with a CurrentCost energy monitor and am dumping the data into an RRD file. Here’s some sample graphs.

[Read More]

GWIP Fun

Yesterday we had an issue with one of our 100 megabit connections to the outside world, which runs most of our WAN traffic. I’m posting this to try and convince ya’ll on the interwebs to double-check my thinking.

So, here’s the timeline:

  • Approximately 1305 outbound usable bandwidth from our active GWIP link dropped to an average of ~20Mbit/second. The maximum outbound packet rate sat on approximately 5000 packets/second. Inbound data was not affected.
  • Investigations started at approximately 1330, it was originally believed that power brownouts which affected many sites in the SEQ region at approximately 1215-1220 could have been affecting services.
  • At approximately 1415pm a job was logged with The Vendor.
  • The job was escalated within The Vendor to Tier2 at approximately 1500, and I spoke with some Vendor reps about the escalation approximately ten minutes later.
  • As of approximately 1515, packet rates started to rise and outbound bandwidth started to increase.
  • I spoke with their tech at approximately 16:15; he advised that during the impact to services we were over-utilizing the link.
  • The Vendor claims that due to the fact that their systems show 5 minute averages and ours 1 minute, this explains the 80Mbit/second disparity in traffic displayed on our respective systems.

Other facts:

[Read More]

MySQL Queries and learning a little more…

Once in a while I actually get to remember enough to help someone - with something I’m actually interested in - not often, but just sometimes. 🙂 Generally I do as much learning as helping along the way.

Someone asked about a slow MySQL query on #sage-au tonight. They had been asked to look into a small e-commerce site that’s been having issues for a few years, slow page loads and the like.

[Read More]

Blocking Hotlinking to images and files in WordPress with a self-hosted block image.

It’s fairly common to find how-to’s that show you how to use .htaccess to block hotlinked images, but it seems a lot of them show you to redirect to an outside file. Not sure why that’s a good idea, or not mentioned, but meh.

Now, the important rules are in the second and last lines. The last line redirects any hotlinked images (which don’t come from your sites’ domains. The second line un-blocks the redirect protection for only that image.

[Read More]

Crime City Game for Android – Lost my game?

If you think your save game in Crime City has gone missing, do the following…

  1. Reset your phone
  2. Wait for the USB media check to stop (and close all other apps)
  3. Load the game

If that doesn’t work

  1. Go into task manager,
  2. Kill all running non-system apps, including backup/sync programs etc.
  3. Try again

If it can’t access storage (such as when startup is happening) it’ll flip out and not be able to get/save to the cached files it needs to. I dare say this probably happens with Modern War by Gree.

[Read More]

Evil bastard spider

I present to you my evil nemesis, the spider with the evil eye.

This thing had so much heft that while walking along the floor you could hear his feet go tickticktick etc. Scary as hell.

Scarier still, there was a bright red reflection visible to the naked eye from one of his eyes. Maybe he’s actually a terminator?

I think this chatlog sums it up, really:

21:56 yaleman: ffs

[Read More]

Ruger Charger in Nordic Components AR-22 Stock

This is how it looks currently, with a chinese-copy EOTech and some Magpul MBUS’ front and rear. The hand grip is an airsoft 4″ long one, which looks much less out of place than the alternatives, which are 7″ or so, and would cover the barrel.

It shoots incredibly well, seeing as it weighs a couple of KG’s (exact weight to come) and it’s only shooting 22LR 🙂

[Read More]

This is not the error you were looking for…

It seems when I was messing around with our printer a few months back, I may have changed an error message or two for the fun of it.

Somehow, it took over three months for the message to actually be noticed - a workmate came to me asking what I’d done to the printer - I wonder why he came straight to me? 🙁

[Read More]