Skip to content

Instantly share code, notes, and snippets.

View eriawan's full-sized avatar
:octocat:
Focusing on .NET, C#, F# and Azure DevOps

Eriawan Kusumawardhono eriawan

:octocat:
Focusing on .NET, C#, F# and Azure DevOps
View GitHub Profile
@eriawan
eriawan / test_fsharpcode_in_table_markdown.md
Last active July 15, 2016 10:49
test F# code in table of markdown

Verbose syntax

Language construct Lightweight syntax Verbose syntax

This walkthrough is a beginner's guide to learning basic interactive concepts and how to navigate the C# Interactive Window. To learn more about the Interactive window, watch this video or check out our documentation.

Note: This walkthrough is adapted from Bill Chiles' original. Thanks, Bill!

Introduction: What is Interactive?

With the new C# Interactive window, you get immediate feedback on what an expression will return or what an API call does. The Interactive window is much like the Immediate window, but the Interactive window has many improvements such as IntelliSense features and the ability to redefine functions and classes. After entering a code snippet at the REPL prompt, the code simply executes right away. You can enter statements and expressions, as well as class and function definitions. You do not need to create a project, defin

@eriawan
eriawan / BuildEventsPropPage.vb
Created July 21, 2017 11:21
Proposed BuildEventsPropPage implementation
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Imports System.Drawing
Imports System.Windows.Forms
Imports EnvDTE
Imports Microsoft.VisualStudio.Editor
Imports Microsoft.VisualStudio.Shell.Interop
Imports VSLangProj80
Namespace Microsoft.VisualStudio.Editors.PropertyPages
@eriawan
eriawan / ClassLibrary3.csproj
Created April 3, 2018 15:24
Sample .NET 4.7.1 project that has PackageReference support
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8466A4EB-38EA-437C-930E-F534B48FF536}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClassLibrary3</RootNamespace>
@eriawan
eriawan / VSTS.yml
Created November 6, 2018 12:22 — forked from MarcusFelling/VSTS.yml
Example VSTS YAML build with 5 phases
phases:
- phase: CD
queue: LEP
steps:
- task: PowerShell@1
displayName: ExtConfigs_PreBuild.ps1
inputs:
scriptType: filePath
scriptName: "$(repo.BuildScripts)/ExtConfigs_PreBuild.ps1"
arguments: ''
@eriawan
eriawan / gist:c14140ae45dd88c4bf6bab0a483426d6
Created March 28, 2019 11:29 — forked from steelcm/gist:2558512
Find open ports on windows server using PowerShell
PS C:\> netstat -an | select-string -pattern "listening"
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:81 0.0.0.0:0 LISTENING
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:383 0.0.0.0:0 LISTENING
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<ItemGroup>
@eriawan
eriawan / example.md
Created June 23, 2020 10:09 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@eriawan
eriawan / dotnet-hacktoberfest2020-issues-list.MD
Created September 25, 2020 09:25
.NET Core repos' issues list that available to grab for Hactoberfest 2020!

.NET Core issues list that available to grab for Hactoberfest 2020!

Don't worry, I have curated the list to only list up-for-grab/help wanted issues that has no assignee and no PR linked if possible, so you'll start to hammer those keyboard to write a fix/feature/whatever code for PR :)

Here's the list:

@eriawan
eriawan / sonarqube-remove-branch-name.yml
Created January 11, 2021 13:49 — forked from wilbit/sonarqube-remove-branch-name.yml
It removes sonar.branch.name property in Azure Pipeline. Put it somewhere between your SonarQubePrepare and SonarQubeAnalyze tasks.
- powershell: |
$params = "$env:SONARQUBE_SCANNER_PARAMS" -replace '"sonar.branch.name":"[\w/,-.]*"\,?'
Write-Host "##vso[task.setvariable variable=SONARQUBE_SCANNER_PARAMS]$params"