Wednesday, 23 October 2013

Windows 8.1 USB installer and dual booting

Looks like Microsoft make the task dead simple for you now…

Although if you get into the trouble I had with GPT bios issues, then use this trick instead…

Also for all you need to know about dual booting between various flavours of Windows see here

EaseUS Backup Free here (for system imaging backups)

MyDefrag defragger to move MBT here

Thursday, 17 October 2013

No Cache Attribute in MVC

    using System;
using System.Web;
using System.Web.Mvc;
using RRA.Core.Services.Utilities;

/// Disables browser caching.

public class NoCacheAttribute : ActionFilterAttribute
/// Called by the ASP.NET MVC framework before the action result executes.

/// The filter context.
public override void OnResultExecuting(ResultExecutingContext filterContext)

Tuesday, 15 October 2013

My VS macros

Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports EnvDTE90a
Imports EnvDTE100
Imports System.Diagnostics
Public Module Module1
    'Empty routine that just causes VS to flush its memory to disk
    Sub ReleaseMemory()
    End Sub
    Sub RebuildDocumentationUpwards()
    End Sub
    Sub AttachToW3p()
    End Sub
    Sub AttachToLocalWebDev()
    End Sub
    Sub AttachToMyProcess()
    End Sub
    Sub AttachToMyProcessScript()
        AttachToProcess("MyProcess.exe", True)
    End Sub
    Private Sub AttachToProcess(ByVal ProcessName As String, Optional ByVal ScriptOnly As Boolean = False)
            Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger
            Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default")
            Dim dbgeng(2) As EnvDTE80.Engine
            dbgeng(0) = trans.Engines.Item("Script")
            If ScriptOnly Then
                Array.Resize(dbgeng, 1)
                dbgeng(1) = trans.Engines.Item("Managed")
            End If
            Dim proc2 As EnvDTE80.Process2 = dbg2.GetProcesses(trans, System.Environment.MachineName).Item(ProcessName)
            Call proc2.Attach2(dbgeng)
        Catch ex As System.Runtime.InteropServices.COMException
            Select Case ex.ErrorCode
                Case -2147352565
                    ShowMessage(ProcessName & " is not currently a running process")
                Case -1989083106
                    ShowMessage("You are already attached to " & ProcessName)
                Case Else
                    ShowMessage("Unhandled error message from Attach to process macro")
            End Select
        Catch ex As System.Exception
            MsgBox("Unhandled exception occurred: " & ex.Message)
        End Try
    End Sub
    Private Sub ShowMessage(ByVal message As String)
        Call MsgBox(message, MsgBoxStyle.Exclamation, "Attach to process macro")
    End Sub
End Module

Wednesday, 9 October 2013

GOTCHA: The resurrection of TFS source control folders

Today we found something very interesting with Team Foundation Server (TFS) source control folder workflow. A colleague of mine had deleted a source control folder from TFS source control, but as I hadn't got latest on the parent folder, I was not aware that he had done this.

I was then able to add a script to this deleted folder, check in my change, and this had the implicit effect of undeleting the folder that my colleague wanted removed.

One to watch out for in case you don't always do a full get latest from the route of your source control project.

How to Fix a Humax HDR FOX T2 PVR that will not stay powered on

Issue When you attempt to power on your Humax the standby orange light goes blue for a moment, and then powers off automatically again. ...