Skip to content

Instantly share code, notes, and snippets.

<Target Name="CopyPdbToPackage" Inputs="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" Outputs="%(ProjectReference.Identity)"
AfterTargets="CopyProjectReferencesToPackage">
<PropertyGroup>
<CurrentReference>%(ProjectReference.Identity)</CurrentReference>
<CurrentReferenceName>$([System.IO.Path]::GetFileNameWithoutExtension($(CurrentReference)))</CurrentReferenceName>
</PropertyGroup>
<Message Text="Copying PDB of $(CurrentReferenceName) to packages..." Importance="high" Condition="'%(ProjectReference.NugetIgnore)'!='true'"/>
<ItemGroup>
@vchirikov
vchirikov / fusion.bat
Last active August 23, 2019 10:01
CLR Fusion log collection
@echo off
SET PERFVIEW=C:\tools\PerfView64.exe
SET FUSLOGPATH=%~dp0
echo Press enter when ready to start collection...
pause
reg add HKLM\Software\Microsoft\Fusion /reg:64 /f /v EnableLog /t REG_DWORD /d 1
reg add HKLM\Software\Microsoft\Fusion /reg:64 /f /v LogFailures /t REG_DWORD /d 1
reg add HKLM\Software\Microsoft\Fusion /reg:64 /f /v LogResourceBinds /t REG_DWORD /d 0
reg add HKLM\Software\Microsoft\Fusion /reg:64 /f /v LogPath /t REG_SZ /d %FUSLOGPATH%
@milesbxf
milesbxf / monzo-alertmanager-config.yaml
Last active April 16, 2025 20:12
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Diagnostics;
using System.IO.Pipelines;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
@3v1n0
3v1n0 / keybindings.json
Last active January 23, 2024 05:53
VSCode keybindings for alternative HJLK navigation, when using non-vim mode and support for quick panel navigation with Tab/Shift+Tab.
/* VSCode keybindings for alternative HJLK navigation, when using non-vim mode
* and support for quick panel navigation with Tab/Shift+Tab.
*
* So basically I just tried to use everywhere in the editor these aliases:
* Alt+j = down
* Alt+k = up
* Alt+l = right
* Alt+h = left
* Alt+b = previous-word
* Alt+w = next-word
@kobymeir
kobymeir / teamcity_github_pr_branch.py
Last active June 6, 2019 13:26 — forked from dzzh/teamcity_github_pr_branch.py
Inject source and target branches from Github pull request into TeamCity CI
#!/usr/bin/env python
import os
import sys
import json
try:
from urllib.request import Request, urlopen # Python 3
except:
from urllib2 import Request, urlopen # Python 2
@trungv0
trungv0 / haproxy.sh
Last active March 19, 2025 15:42
RabbitMQ cluster with HAProxy & Keepalived for high availability
# install haproxy
yum install -y haproxy
# config haproxy for rabbitmq
cat > /etc/haproxy/haproxy.cfg << "EOF"
global
log 127.0.0.1 local0 notice
maxconn 10000
user haproxy
@staringispolite
staringispolite / asciiputsonglasses
Last active January 20, 2025 07:52
Ascii art sunglasses meme
Puts on glasses:
(•_•)
( •_•)>⌐■-■
(⌐■_■)
Takes off glasses ("mother of god..."):
(⌐■_■)
( •_•)>⌐■-■
@mandiwise
mandiwise / Count lines in Git repo
Last active April 1, 2025 02:43
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@davidfowl
davidfowl / dotnetlayout.md
Last active April 14, 2025 07:13
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/