Skip to content

Instantly share code, notes, and snippets.

  1. Install p4merge
  2. git config -e or git config --global -e
  3. Add the following to the config file.
[diff]
	tool = p4
[difftool "p4"]
	cmd = \"/Applications/p4merge.app/Contents/Resources/launchp4merge\" \"$LOCAL\" \"$REMOTE\"
@OlsonAndrewD
OlsonAndrewD / MainPage.xaml
Last active December 28, 2015 06:39
Workaround for ComponentArt PieChart resizing issue -- http://www.componentart.com/community/forums/p/64819/113629.aspx#113629
<UserControl
x:Class="PieChartTest.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:caCommon="clr-namespace:ComponentArt.Silverlight.DataVisualization.Common;assembly=ComponentArt.Silverlight.DataVisualization.Common"
xmlns:caCharting="clr-namespace:ComponentArt.Silverlight.DataVisualization.Charting;assembly=ComponentArt.Silverlight.DataVisualization.Charting"
xmlns:my="clr-namespace:PieChartTest"
mc:Ignorable="d"
@OlsonAndrewD
OlsonAndrewD / TestHelper.cs
Last active December 19, 2015 07:59
Test refactoring
// This class helps reduce the amount of code in each test.
private class TestHelper
{
private DateTime StartTime;
private Enums.MetricStorageInterval DataGranularity;
private List<ceQryDashboardGadgetDataBO> Data1;
private List<ceQryDashboardGadgetDataBO> Data2;
private List<ExpectedResult> ExpectedResults;
@OlsonAndrewD
OlsonAndrewD / StringFormatHelper.cs
Last active October 14, 2021 11:33
Ever wanted to write some XAML like Text="{Binding SomeValue, StringFormat={Binding SomeFormat}}"? You can't. But here's a way to get close, using attached properties.
public static class StringFormatHelper
{
#region Value
public static DependencyProperty ValueProperty = DependencyProperty.RegisterAttached(
"Value", typeof(object), typeof(StringFormatHelper), new System.Windows.PropertyMetadata(null, OnValueChanged));
private static void OnValueChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
{
RefreshFormattedValue(obj);