Archive for category Tools

Installing Subversion on Windows

My requirements are to host the repository on a windows machine, mostly for access from the LAN but also to be accessible over the Internet. The server is running Vista but the install and set up process should be similar on other versions of windows.

Currently there are two relevant builds of Subversion, one based on apache 2.0 and one based on 2.2. I am going to install Apache 2.2 and the corresponding Subversion build.

Install the Apache HTTP server.

Download and run the latest subversion build (currently svn-1.4.6-setup.exe) from http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&expandFolder=8100&folderID=91

Copy the file mod_dav_svn.so from C:\Program Files\Subversion\bin to C:\Program Files\Apache Software Foundation\Apache2.2\modules.

Open the Apache configuration file (‘Start > All Programs > Apache HTTP Server 2.2 > Configure Apache Server > Edit the Apache httpd.conf Configuration File’) and find the line ‘#LoadModule dav_module modules/mod_dav.so’.

Remove the ‘#’ from the front of that line then add the line ‘LoadModule dav_svn_module modules/mod_dav_svn.so’ below it. Save the file and restart the service to confirm everything is working as it should.

Create the directory where you want to store the repositories (e.g. D:\Svn).

Go back to the Apache configuration file and at the end of the file add:

<Location /Svn>
    DAV svn
    SVNListParentPath on
    SVNParentPath D:\Svn
</Location>

Save the changes then restart the Apache service for them to take effect.

You should now be able to browse to http://localhost:81/Svn/ and see a page with zero repositories.

No Comments

Installing Apache HTTP Server on Windows

I am setting up a machine to host Subversion. My preference is to use Apache as the HTTP server. The server is running Vista but the install and set up process should be similar on other versions of windows.

Download
The latest Apache build (currently apache_2.2.9-win32-x86-no_ssl-r2.msi) from http://httpd.apache.org/download.cgi

Install Apache
Run the installer and follow the instructions. Enter the server name under ‘Network Domain’ and ‘Server Name’, enter an email address and leave ‘for All Users’ selected.
ApacheInstall

Navigate to http://localhost/ and you should see the text ‘It works!’.

I prefer to run IIS on port 80 and Apache on 81. If you already have IIS installed and running you may not have got the ‘It works!’ page but rather an IIS page when running the test above.

Change to Port 81
‘Start > All Programs > Apache HTTP Server 2.2 > Configure Apache Server > Edit the Apache httpd.conf Configuration File’

Search for  ‘Listen 80′ and replace with ‘Listen 81′

Save the conf file and restart the service from the services console then browse to http://localhost:81/ to confirm it works.

Create a Password File
Open a command prompt at C:\Program Files\Apache Software Foundation\Apache2.2.

Create a password file by entering ‘bin\htpasswd -c passwd username‘ and enter and confirm the password when prompted.

Add any further users with ‘bin\htpasswd passwd username‘.

Edit the Apache httpd.conf configuration file and change:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

To:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    AuthType Basic
    AuthName “Subversion Repositories”
    AuthUserFile passwd
    Require valid-user
</Directory>

Restart the Apache 2.2 service and confirm you are asked for a username and password when you navigate to http://localhost:81/.

You may need to amend your firewall to allow connections from port 81.
ApacheWindowsFirewall

1 Comment

Macro to Set Outlook’s Master Category List

I upgrade, move, or reinstall the OS on my PCs fairly often so setting a master category list with a macro is useful:

Public Sub ResetCategories()

    DeleteAllCategories
   
    CreateCategory “! goals”, 1, 0
    CreateCategory “! objectives”, 2, 0
    CreateCategory “! projects”, 3, 0
    CreateCategory “@ anywhere”, 4, 0
    CreateCategory “@ computer”, 5, 0
    CreateCategory “@ email”, 6, 0
    CreateCategory “@ errands”, 7, 0
    CreateCategory “@ home”, 8, 0
    CreateCategory “@ office”, 9, 0
    CreateCategory “@ phone”, 10, 0
    CreateCategory “1:1″, 11, 0
    CreateCategory “2 inbox”, 23, 1
    CreateCategory “2 someday maybe”, 24, 0
    CreateCategory “2 waiting for”, 19, 0
    CreateCategory “meeting”, 22, 0
    CreateCategory “holiday”, 17, 0
    CreateCategory “social”, 18, 0
    CreateCategory “STS”, 20, 0
    CreateCategory “travelling”, 21, 0
    CreateCategory “cards”, 25, 0
   
End Sub

Private Sub DeleteAllCategories()
    Dim objNameSpace As NameSpace
    Dim objCategory As Category
   
    Set objNameSpace = Application.GetNamespace(“MAPI”)
   
    If objNameSpace.Categories.Count > 0 Then
       
        For Each objCategory In objNameSpace.Categories
            objNameSpace.Categories.Remove (objCategory.CategoryID)
        Next
       
    End If
       
    Set objCategory = Nothing
    Set objNameSpace = Nothing
   
End Sub

Private Sub CreateCategory(strCategoryName As String, intColor As Integer, intKey As Integer)
    Dim objNameSpace As NameSpace
    Dim objCategory As Category
   
    Set objNameSpace = Application.GetNamespace(“MAPI”)
   
    If intColor > 25 Then intColor = -1
   
    objNameSpace.Categories.Add strCategoryName, intColor, intKey
       
       
    Set objCategory = Nothing
    Set objNameSpace = Nothing
   
End Sub

No Comments

Outlook Item to Task Macro

The following macros convert outlook items to tasks with different categories. Based on this blog post which in turn is based on this one.

  • The item body is copied to the task body and the item itself is added as an attachment.
  • If multiple items are selected, multiple tasks will be created.
  • Created tasks are left open for editing.
  • I am in two minds about deleting the item after the task is created and have decided against it at the moment.
  • It appears that OL 2007 does not allow shortcut keys to be assigned to macros .

Public Sub CreateInboxTaskFromItem()
    CreateCatagorisedTaskFromItem (“2 inbox”)
End Sub

Public Sub CreateWaitingTaskFromItem()
    CreateCatagorisedTaskFromItem (“2 waiting for”)
End Sub

Public Sub CreateSomedayTaskFromItem()
    CreateCatagorisedTaskFromItem (“2 someday maybe”)
End Sub

Public Sub CreateTaskFromItem()
    CreateCatagorisedTaskFromItem (“”)
End Sub

Private Sub CreateCatagorisedTaskFromItem(catagory As String)

  Dim olTask As Outlook.TaskItem
  Dim olItem As Object
  Dim olExp As Outlook.Explorer
  Dim fldCurrent As Outlook.MAPIFolder
  Dim olApp As Outlook.Application
 
  Set olApp = Outlook.CreateObject(“Outlook.Application”)
  Set olExp = olApp.ActiveExplorer
  Set fldCurrent = olExp.CurrentFolder
 
  Dim cntSelection As Integer
  cntSelection = olExp.Selection.Count
 
  For i = 1 To cntSelection
    Set olTask = olApp.CreateItem(olTaskItem)
    Set olItem = olExp.Selection.Item(i)
    olTask.Attachments.Add olItem
    olTask.Body = olTask.Body + olItem.Body
    If catagory = “2 waiting for” Then
        olTask.Subject = olItem.SenderName & “: ” & olItem.Subject
    Else
        olTask.Subject = olItem.Subject
    End If
    olTask.Categories = catagory
    ‘olItem.Delete
    olTask.Display
    olTask.Save
  Next
 
End Sub

20 Comments

User Commands in Xplorer2

When I am doing anything more complicated than simple file browsing I use Xplorer2 rather than the windows file browser.

One of the features of Xplorer2 is the ability to run commands on files you have selected.

These are the commands I currently have set up:

  • VS Cmd
    $”C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sdkvars.bat”
    Sets the console to act like a Visual Studio command prompt
  • Get Public Key
    $sn -Tp “$F”
    Gets an assemblies public key (requires vs Cmd to be run first).
  • DiffMerge Files
    >”C:\Program Files\SourceGear\DiffMerge\DiffMerge.exe” “$F” “$G”
    Uses Source Gear’s DiffMerge to diff files from each pane.
  • DiffMerge Folders
    >”C:\Program Files\SourceGear\DiffMerge\DiffMerge.exe” “$P” “$I”
    Uses Source Gear’s DiffMerge to diff folders from each pane (although Xplorer2 does this well enough itself).
Tags:

No Comments