Skip to content

Instantly share code, notes, and snippets.

View tomasr's full-sized avatar

Tomas Restrepo tomasr

View GitHub Profile
@tomasr
tomasr / error.txt
Created February 9, 2017 18:13
Roslyn Error
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Microsoft.CodeAnalysis.SymbolId.Parser.GetNthTypeParameter(INamedTypeSymbol typeSymbol, Int32 n)
at Microsoft.CodeAnalysis.SymbolId.Parser.ParseTypeParameterSymbol(List`1 results)
at Microsoft.CodeAnalysis.SymbolId.Parser.ParseSymbolId(List`1 results)
at Microsoft.CodeAnalysis.SymbolId.Parser.ParseTypeSymbol()
at Microsoft.CodeAnalysis.SymbolId.Parser.ParseTypeArguments(List`1 typeArguments)
at Microsoft.CodeAnalysis.SymbolId.Parser.GetMatchingTypes(INamespaceOrTypeSymbol container, String name, List`1 results)
at Microsoft.CodeAnalysis.SymbolId.Parser.GetMatchingTypes(IReadOnlyList`1 containers, String name, List`1 results)
at Microsoft.CodeAnalysis.SymbolId.Parser.ParseNamedSymbol(List`1 results)
at Microsoft.CodeAnalysis.SymbolId.Parser.ParseSymbolId(List`1 results)
@tomasr
tomasr / error.txt
Created July 7, 2016 13:14
VsVim Error
System.InvalidOperationException: IWpfTextView has not completed its layout.
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot, SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight, Boolean preserveViewportTop, Nullable`1 cancel)
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DisplayTextLineContainingBufferPosition(SnapshotPoint bufferPosition, Double verticalDistance, ViewRelativePosition relativeTo, Nullable`1 viewportWidthOverride, Nullable`1 viewportHeightOverride)
at Microsoft.VisualStudio.Text.Editor.Implementation.CaretElement.InnerEnsureVisible()
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoActionThatShouldOnlyBeDoneAfterViewIsLoaded(Action action)
at Microsoft.VisualStudio.Text.Editor.Implementation.CaretElement.EnsureVisible()
at Vim.Modes.Normal.NormalMode.OnE
@tomasr
tomasr / Get-AIInstrumentationKeys.ps1
Created February 19, 2016 19:19
Get Application Insights Instrumentation Keys
Function Get-AIInstrumentationKeys() {
Get-AzureRmResource |
Where-Object { $_.ResourceType -eq 'Microsoft.Insights/components' } |
ForEach-Object {
$aiObj = Get-AzureRmResource -ResourceId $_.ResourceId
Write-Output ([pscustomobject]@{
ResourceGroup = $aiObj.ResourceGroupName;
ResourceName = $aiObj.ResourceName;
InstrumentationKey = $aiObj.Properties.InstrumentationKey
})
@tomasr
tomasr / VM+P2S_VPN.json
Created February 1, 2016 19:50
VM + P2S VPN ARM Template Example
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "Username for the Virtual Machine."
}
@tomasr
tomasr / EtwFilter.cs
Created November 27, 2015 14:57
Filtering ETW Traces by PID
using System;
using System.Collections.Generic;
using Microsoft.Diagnostics.Tracing;
using Microsoft.Diagnostics.Tracing.Session;
using System.Linq;
using System.Text;
namespace EtwFilter
{
class Program
@tomasr
tomasr / MyToolWindow.cs
Last active August 29, 2015 14:00
Projection Buffer with TextDataModel
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.VisualStudio.Editor;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;