Skip to content

Instantly share code, notes, and snippets.

View lorddev's full-sized avatar
🎻
likes music

Aaron lorddev

🎻
likes music
View GitHub Profile
@ThiagoBarradas
ThiagoBarradas / sonarqube-dotnet-send-analysis-and-code-coverage.sh
Created March 25, 2019 16:07
Sonarqube - send dotnet code analysis and code coverage
# Install sonarqube scanner / reporter
dotnet tool install --global dotnet-sonarscanner
# Install dotnet tools to generate test report
dotnet tool install --global coverlet.console
dotnet add package coverlet.msbuild
# Start sonarqube process
dotnet build-server shutdown
dotnet sonarscanner begin /o:${SONAR_ORG_KEY} /k:${SONAR_PROJECT_KEY} /v:${VERSION} /d:sonar.host.url=https://sonarcloud.io /d:sonar.login=${SONAR_TOKEN} /d:sonar.cs.opencover.reportsPaths="opencover.xml"
@AArnott
AArnott / Cancellation.cs
Last active October 16, 2024 17:10
Graceful console app cancellation on Ctrl+C
class Program
{
static async Task Main(string[] args)
{
// Add this to your C# console app's Main method to give yourself
// a CancellationToken that is canceled when the user hits Ctrl+C.
var cts = new CancellationTokenSource();
Console.CancelKeyPress += (s, e) =>
{
Console.WriteLine("Canceling...");
@johnnyasantoss
johnnyasantoss / .gitconfig
Last active May 13, 2024 16:58
JetBrains Rider as Default Merge and Diff tool
# Diff with JetBrains Rider
[diff]
tool = rider
[difftool]
prompt = false
[difftool "rider"]
cmd = D:\\\\Program\\ Files\\\\Jetbrains\\\\apps\\\\Rider\\\\ch-0\\\\181.4379.788\\\\bin\\\\rider64.exe diff "$LOCAL" "$REMOTE"
# Merge with JetBrains Rider
[merge]
@koenpunt
koenpunt / chosen-bootstrap.css
Last active March 11, 2023 01:01
Bootstrap 3.0 theme for Chosen
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
@briancavalier
briancavalier / 1-instructions.md
Created August 8, 2012 21:05
Hello wired for wire.js in node

Hello wire in node.js

  1. mkdir hello-wire
  2. cd hello-wire
  3. npm install wire
  4. Create main.js and spec.js as per the files in this gist.
  5. node main.js
@jpoehls
jpoehls / gist:2030795
Created March 13, 2012 19:02
Using CTRL+W to close tabs in Visual Studio

In Tools | Options | Keyboard...

  1. Add CTRL+W as a Global shortcut for Window.CloseDocumentWindow
  2. Remove the CTRL+W shortcut for Edit.SelectCurrentWord

The caveat to this is if you are used to using CTRL+W to select the current word. If you do, find another shortcut that works for that.

@LukeWinikates
LukeWinikates / FakeDbSet.cs
Created October 24, 2011 16:31
An implementation of IDbSet to help with mocking Entity Framework DbContexts.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EntityExtensions {
public class FakeDbSet<T> : System.Data.Entity.IDbSet<T> where T : class {
private readonly List<T> list = new List<T>();
public FakeDbSet() {