jamesoff.net




10
Sep
2008
1

Risk Disk and Squid

We use RiskDisk at work to see if a company we’re going to do business with is trustworthy, but recently it was complaining HTTP Error 417: Expectation Failed when it tried to do any online lookups.

I tracked this down to it sending Expect: 100-continue in the headers of the request it sent to its server. However, it was going via our web proxy at work, which is Squid. Recently I upgraded Squid to 2.7, and this seems to be the cause of the problems. Squid 2.7 is less forgiving about that particular header (which is apparently an RFC violation on the part of the client).

It’s easily fixed by adding ignore_expect_100 on to your Squid configuration.


Permalink | Posted in FreeBSD Sysadmin Work and tagged  



11
Apr
2008
1

Delphi documentation

While writing some Delphi code at work, I spotted this in the documentation. Not sure if I want to call that function or not now…


Permalink | Posted in Coding Work and tagged  



23
Oct
2007
0

Checking for another process before starting JKDefrag

A user on the JKDefrag forum was asking about not running JKDefrag if another process is running (as they don’t play nice together), so I whipped this up.

You’ll need PsList from SysInternals in your path somewhere.

Change the three SET lines to point to jkdefrag, give the parameters you want to use, and the name of the program to avoid. (Get the name of the program from PsList.)

The “>2 NUL” sends stderr to NUL to avoid printing the PsList banner. It works on Vista, not sure about XP/2003. If it doesn’t just remove it and live with the PsList banner showing up.

Making this check for more than one process is an exercise for the reader. Also, you could use this with PsExec to check for the process on a remote host and then launch JKDefrag over there.

@echo off

REM Only run jkdefrag if another process is not running

REM Path to jkdefrag
SET JKDEFRAG=c:\jkdefrag\jkdefrag.exe

REM Options for jkdefrag
SET JKDEFRAGOPTS=-a 3

REM Process we don't want running
SET AVOID=explorer

 
REM Here we go!
 
pslist %AVOID% > NUL 2> NUL
if %ERRORLEVEL% == 0 goto skip

REM If we made it here, pslist didn't find the process
echo Couldn't find %AVOID% running, starting jkdefrag...
%JKDEFRAG% %JKDEFRAGOPTS%
goto end
 
:skip
echo %AVOID% is running, not running jkdefrag
 
:end




16
Apr
2007
0

Murdering dogs

I’ve been having some problems with the “Search Assistant” (the stupid dog thing in Explorer on Windows XP when you use the Find thingy) at work. For some reason recently opening the search sidebar results in Explorer crashing with a Data Execution Prevention error. Disabling the DEP stuff for explorer.exe just results in a regular crash. Alas, to disable the dog thing you need to be able to open the search panel… or just stick this in your registry.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState]
 
"FullPathAddress"=dword:00000001
"Use Search Asst"="no"

Log off and back on again and the dog has been slaughtered.

Stupid yapping thing. :fuckoff:





29
Jan
2007
0

Setting localparts in Exchange Recipient Policies

It’s taken me too long to find this.

(For the uninitiated, Exchange Recipient Policies tell Active Directory how to automatically generate email addresses for your users.)

If you want to tell a recipient policy in Exchange 2003 (and presumably 2007) how to generate the localpart other then just username, use these expanos:

%s : Surname (last name)

%g : Given name (first name)

%i : Middle initial

%d : Display name

%m : Exchange 2003 alias

%rxy : Replace all subsequent characters x with character y in username. If x = y, the character will be deleted.

There are other things you can do like chopping the string to a certain number of characters, see the full article for details.

No longer will I have to manually add first.last@domain.com to every user I create :D

http://support.microsoft.com/Default.aspx?kbid=822447





19
Dec
2006
0

Sorry, what?

The disc is created.

Remove the disc and label it

“VGN-SZ3VMP_X Application Recovery Disc”

That’s easy for you to say, Sony.


Permalink | Posted in Fun Sysadmin Work 



5
Dec
2006
3

Quite telling

In the kitchen at work, a box has appeared with a riddle on it, inviting people to submit their answers for a prize draw.

What is brown, has a head and a tail but no legs?

The girls agree it’s a one or two pence coin.

The consensus among the boys seems to be that it’s a turd.


Permalink | Posted in Fun Work 



10
Oct
2006
1

APC features

While rummaging around the APC site to find information on Uninterruptible Power Supplies, I noted that one of the features was “ERROR: No Translation Found”:

apc.png

I’m not sure if an error is a feature I do or don’t want, to be honest.


Permalink | Posted in Fun Work internets 



6
Sep
2006
1

Small World

While chatting with my new boss at lunchtime the other day, she said that her favourite restaurant was in Tring, which I mentioned was near where I came from. When I said I came from Aylesbury (because most people have heard of that) she said

Oh, I went to school in Aylesbury

“Me too!” I replied, “Which school did you go to?”

Aylesbury Grammar

:fry: This might seem a little odd since AGS is an all-boys school, and Viv isn’t any boy at all. However, all is explained by the fact that she started there before the girls split off and formed Aylesbury High over the road.

It’s a small world after all.

(That last line was added especially for simsea.)


Permalink | Posted in Work