Skip to content

Instantly share code, notes, and snippets.

View disouzam's full-sized avatar
🚲

Dickson Souza disouzam

🚲
View GitHub Profile
@disouzam
disouzam / Useful-git-configs.txt
Last active June 12, 2024 00:48
Useful git configs
[user]
name = Dickson Souza
email = 36424026+disouzam@users.noreply.github.com
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
@disouzam
disouzam / .editorconfig
Last active September 11, 2023 21:59
Base editorconfig for C# and Visual Basic code
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
###############################
# Core EditorConfig Options #
###############################
# All files
[*]
indent_style = space
# Code files
@disouzam
disouzam / settings.json
Created December 24, 2022 02:40
Base settings.json for dotnet projects with variable for branch coverage threshold
{
"configuration": "release",
"{projectName}.branchCoverage.threshold": 100,
"debug.terminal.clearBeforeReusing": true,
"terminal.integrated.automationProfile.windows": {
"path": "C:\\Windows\\System32\\cmd.exe"
},
"files.exclude": {
"**/bin": true,
"**/obj": true,
@disouzam
disouzam / remove-bin-obj.bat
Created December 24, 2022 02:54
Remove bin and obj folders using batch script
@echo off
@echo ======================================================
@echo {mainProjectName} - Remove bin and obj folders
@echo ======================================================
@echo off
@echo.
@echo.
cd ..\
md log
@disouzam
disouzam / pre-commit-hook.sh
Created December 24, 2022 02:57
Pre commit hook
#!/bin/sh
BLUE='\033[0;34m'
RED='\033[0;31m'
NOCOLOR='\033[0m'
# Check if the version of pre-commit hook was updated in version control
# since it is not possible to version control the actual pre-commit script
original_pre_commit_hook=".git/hooks/pre-commit"
pre_commit_hook_in_version_control=".git-hooks-for-reuse/pre-commit"
@disouzam
disouzam / stryker-config.json
Created December 24, 2022 03:01
Sample stryker-config.json .NET project
{
"stryker-config": {
"additional-timeout": 20000,
"baseline": {},
"concurrency": 4,
"coverage-analysis": "perTest",
"disable-bail": false,
"disable-mix-mutants": false,
"ignore-methods": [],
"ignore-mutations": [],
@disouzam
disouzam / sonarscanner.windows.bat
Created December 30, 2022 12:08
Sample batch script to run SonarScanner locally
@REM In order to execute sonar coverage, you'll need to have sonarqube community downloaded and running local on your machine
@REM and sonarscanner installed as well and placed its /bin folder as a PATH ENVIRONMENT VARIABLE.
@REM Additionaly, you need to provide a Project TOKEN and set its value on LOGIN parameter (line 7).
set project="PLACE PROJECT NAME HERE"
set login="PLACE YOUR TOKEN HERE"
set host=http://localhost:9000
@disouzam
disouzam / VSCode-Extensions
Created August 23, 2023 11:51
List of current used VS Code extensions
https://marketplace.visualstudio.com/items?itemName=formulahendry.dotnet-test-explorer
https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel
https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments
https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-themes
https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp
https://marketplace.visualstudio.com/items?itemName=wmaurer.change-case
https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap
@disouzam
disouzam / SettingHEADBackToMain.md
Created October 1, 2023 19:25
Setting HEAD back to main
@disouzam
disouzam / AutoStopWatch.cs
Created October 10, 2023 01:05
File with two classes that implement StopWatches
// Reference:
// https://stackoverflow.com/questions/3903222/measure-execution-time-in-c-sharp
// Answer by https://stackoverflow.com/users/435383/katbyte
using System;
using System.Diagnostics;
using System.Threading;
namespace Diagnostic
{