Skip to content

Instantly share code, notes, and snippets.

View kzu's full-sized avatar
💚
Attempt #3 at OSS sustainability, with OSMF now🫰

Daniel Cazzulino kzu

💚
Attempt #3 at OSS sustainability, with OSMF now🫰
View GitHub Profile
@kzu
kzu / setup.cmd
Last active November 29, 2021 19:57
kzu devenv
rem https://github.com/microsoft/winget-cli/releases
rem iwr -useb get.scoop.sh | iex
rem iwr -useb https://community.chocolatey.org/install.ps1 | iex
rem ensure winget settings has experimentalFeatures.experimentalMSStore = true
rem see https://www.thomasmaurer.ch/2021/01/install-apps-from-the-microsoft-store-using-winget/
scoop bucket add extras
scoop bucket add github-gh https://github.com/cli/scoop-gh.git
@kzu
kzu / azure_pipelines.yml
Created September 23, 2020 19:21
Visual Studio Preview in CI
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
- task: UseDotNet@2
inputs:
packageType: sdk
version: 3.1.x
performMultiLevelLookup: true
@kzu
kzu / CSharp.sbntxt
Created September 18, 2020 13:00
source-generators
/// <summary>
/// Provides access to the current assembly information as pure constants,
// without requiring reflection.
/// </summary>
partial class ThisAssembly
{
/// <summary>
/// Gets the assembly metadata.
/// </summary>
public static partial class Metadata
@kzu
kzu / Directory.Packages.props
Created July 31, 2020 02:16
Central Package Versions
<Project>
<ItemGroup>
<PackageReference Update="GitInfo" Version="2.0.20" PrivateAssets="all" />
<PackageReference Update="Newtonsoft.Json" DefaultVersion="12.0.3" />
</ItemGroup>
</Project>
@kzu
kzu / profiles.json
Last active July 22, 2020 06:26
Windows Terminal settings
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{63661ee7-c8c4-434e-8579-f6112c77101f}",
"requestedTheme": "dark",
"profiles":
{
@kzu
kzu / X.Y.Z.Sources.csproj
Last active May 20, 2020 21:28 — forked from attilah/X.Y.Z.Sources.csproj
X.Y.Z.Sources nuget package
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<IsPackable>true</IsPackable>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
@kzu
kzu / IncludePackageReferenceInVSIX.targets
Last active November 28, 2019 17:25
Include nuget package reference assets in VSIX
<Project>
<Target Name="IncludePackageReferenceInVSIX"
Condition="$(CI)"
Inputs="@(PackageReference -> WithMetadataValue('IncludeInVSIX', 'true'))"
Outputs="%(PackageReference.Identity)"
DependsOnTargets="ResolvePackageAssets"
AfterTargets="ResolveReferences">
<PropertyGroup>
<IncludeInVSIXPackageId>%(PackageReference.Identity)</IncludeInVSIXPackageId>
</PropertyGroup>
@kzu
kzu / Program.cs
Last active October 31, 2019 17:49
Using SymSpell to detect 1-char misspellings without hardcoding gazzillion misspellings
// Requires package reference to https://www.nuget.org/packages/symspell
using System;
using System.IO;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
@kzu
kzu / ok
Created March 19, 2019 18:33
ok
@kzu
kzu / query
Created January 18, 2019 00:34
Query package dependencies
query {
organization(login: "moq") {
repository(name: "moq") {
dependencyGraphManifests(withDependencies: true) {
nodes {
filename
dependencies {
nodes {
packageManager
packageName