Monday 19 September 2011

HowTo: Firefox and Integrated Windows Authentication

As per original article:
http://markmonica.com/2007/11/20/firefox-and-integrated-windows-authentication/


Do you have an Intranet or a similar web site that requires the use of Integrated Windows Authentication? If so the default Firefox browser settings will always prompt you for a username and password first before accessing a site using Integrated Window Authentication.

Fortunately Firefox has the slick ability to easily modify it's configuration to use Integrated Windows Authentication.
How to configure Firefox

Open Firefox
In the address bar type: about:config
Firefox3.x and later requires you to agree that you will proceed with caution.
After the config page loads, in the filter box type: network.automatic
* Modify network.automatic-ntlm-auth.trusted-uris by double clicking the row and enter http://www.replacewithyoursite.com or http://your-intranet-server-name
* Multiple sites can be added by comma delimiting them such as http://www.replacewithyoursite.com, http://www.replacewithyourintranetsite.com

Package for Large Installs

If you are a network administrator that has a lot of installs to do, you can modify the Firefox installer.

Use a tool such as 7-zip to extract Firefox Setup 2.x.x.exe
Extract browser.xpi from the setup
Edit all.js contained in browser.xpi contained in binjreprefs
Modify the entries as in items 4 and 5 above
Re-package browser.xpi and use the extracted setup to install Firefox

* Special Notes

To specify all subdomains use .replacewithyoursite.com instead of www.replacewithyoursite.com, help.replacewithyoursite.com, pictures.replacewithyoursite.com

Thursday 8 September 2011

Managing mssql tempdb database and files

If tempdb is set to auto grow, then it will grow only to fill the disk it is in and no more.

So I have created a 1GB ram disk (http://memory.dataram.com/) and set the tempdb to be on the ram disk. This has significantly improved the performance of mssql although I thought tempdb is supposed to be in ram most of the time anyway!!!

The below allows you to see current details of tempdb and files and how they are set to grow:

SELECT
name AS FileName,
size*1.0/128 AS FileSizeinMB,
CASE max_size
WHEN 0 THEN 'Autogrowth is off.'
WHEN -1 THEN 'Autogrowth is on.'
ELSE 'Log file will grow to a maximum size of 2 TB.'
END,
growth AS 'GrowthValue',
'GrowthIncrement' =
CASE
WHEN growth = 0 THEN 'Size is fixed and will not grow.'
WHEN growth > 0 AND is_percent_growth = 0
THEN 'Growth value is in 8-KB pages.'
ELSE 'Growth value is a percentage.'
END
FROM tempdb.sys.database_files;
GO

An the below, lets you specify the exact size of the data and log files and how they grow. The values in the below are all in Mega Bytes.

ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'tempdev', SIZE = 900 , FILEGROWTH = 50)
go
ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'templog', SIZE = 50 , FILEGROWTH = 5)
go

If you want you can set FILEGROWTH to 0 which means it will not grow but this is not required as the tempdb will never grow past the desk space it lives on.

Thursday 1 September 2011

Making VIM display UTF-8 characters correctly

First you need to chose a font which has the characters you need to display

I have found this is a good one:

:set guifont=Consolas

Then you need to set encoding to utf-8

:set enc=utf-8