Skip to content

Instantly share code, notes, and snippets.

View tormodfj's full-sized avatar
💡
Inventing code

Tormod Fjeldskår tormodfj

💡
Inventing code
View GitHub Profile
@tormodfj
tormodfj / clean-bin-obj.bat
Created August 14, 2017 11:56
Easily Clean Bin/Obj Folders
for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d"
@tormodfj
tormodfj / HtmlLabel.cs
Created June 15, 2017 05:42
Xamarin Forms HTML-enabled Label
using Xamarin.Forms;
namespace MyProject.Controls
{
public class HtmlLabel : Label
{
}
}

Using P4Merge with Visual Studio 2015/2017

The diff tool integrated with Visual Studio has been improving with every version. I still prefer dedicated diff/merge tools for the job, however, and P4Merge is my favorite. This small guide describes how to properly integrate P4Merge with Visual Studio 2015.

Note that this only applies when using TFS. If you use git, Visual Studio will use the diff/merge tools configured with git.

Installing P4Merge

The easiest method of installing P4Merge on your computer is with Chocolatey:

====== Test cases for parsing ======
_ _ _ _ _ _ _ _ _
| || || || || || || || || |
|_||_||_||_||_||_||_||_||_|
=> 000000000
| | | | | | | | |
| | | | | | | | |
@tormodfj
tormodfj / CaliburnConfig.cs
Created February 3, 2016 06:54
Custom singularization in Caliburn Micro
ConventionManager.Singularize = Singularize(ConventionManager.Singularize);
// ---------
private Func<string, string> Singularize(Func<string, string> singularize)
{
var singularizeMap = new Dictionary<string, string>
{
{ "Statuses", "Status" }
};
function Get-Calendar {
<#
.SYNOPSIS
Prints a calendar for the provided month and year
.DESCRIPTION
Provided with a month number and a year, prints a month calendar with week starting on monday.
.NOTES
Author : Tormod Fjeldskår
.EXAMPLE
C:\PS> Get-Calendar 2 2016
# Set up Windows
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions
# Utilities
cinst fiddler4
cinst 7zip
cinst GoogleChrome
cinst putty
cinst baretail
cinst paint.net
@tormodfj
tormodfj / Visual Studio Adaptive Keyboard.reg
Created June 5, 2014 16:22
Switch to F-keys for Visual Studio on Lenovo Adaptive Keyboard (thanks @khellang)
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Lenovo\SmartKey\Application\Row\Function\Microsoft Visual Studio 2013]
"AppPath"="C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\devenv.exe"
[HKEY_CURRENT_USER\Software\Lenovo\SmartKey\Application\Row\Function\Microsoft Visual Studio 2012]
"AppPath"="C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\devenv.exe"
@tormodfj
tormodfj / DisableWindowsUpdateReboot.reg
Created February 14, 2014 08:20
Disables automatic reboot as part of Windows Update
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoRebootWithLoggedOnUsers"=dword:00000001