Skip to content

Instantly share code, notes, and snippets.

@PadreSVK
PadreSVK / extensions.ps1
Created May 24, 2021
vsCode extensions
View extensions.ps1
code --install-extension alefragnani.Bookmarks
code --install-extension amillard98.specflow-tools
code --install-extension ban.spellright
code --install-extension bierner.markdown-preview-github-styles
code --install-extension blackmist.LinkCheckMD
code --install-extension CoenraadS.bracket-pair-colorizer-2
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension dbaeumer.vscode-eslint
code --install-extension dkundel.vscode-new-file
code --install-extension DotJoshJohnson.xml
@PadreSVK
PadreSVK / xyz-publish-pipeline.yml
Created May 19, 2021
Sample of multistage pipeline
View xyz-publish-pipeline.yml
trigger:
branches:
include:
- master
pool: "Default"
variables:
displayName: My Awesome project
csprojPath: MyProject.csproj
View extensions.vsext
{
"id": "2f1ebc92-af5e-4d73-b3de-42176db0ac2c",
"name": "My Visual Studio extensions",
"description": "A collection of my Visual Studio extensions",
"version": "1.0",
"extensions": [
{
"name": "#Regions Are Evil",
"vsixId": "4B35EF3B-C2F5-4180-8936-25621C9E1EEA"
},
View Get-NetFrameworkVersion.ps1
$release = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").Release
switch ($release) {
{ $_ -ge 528040 } { "4.8"; Break }
{ $_ -ge 461808 } { "4.7.2"; Break }
{ $_ -ge 461308 } { "4.7.1"; Break }
{ $_ -ge 460798 } { "4.7"; Break }
{ $_ -ge 394802 } { "4.6.2"; Break }
{ $_ -ge 394254 } { "4.6.1"; Break }
{ $_ -ge 393295 } { "4.6" ; Break }
{ $_ -ge 379893 } { "4.5.2"; Break }
@PadreSVK
PadreSVK / .gitignore
Created Apr 21, 2021
dotnet gitignore created by `dotnet new gitignore`
View .gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
@PadreSVK
PadreSVK / Startup.cs
Created Apr 12, 2021
DBContext registration with design time factory and usage of extension method GetConnectionString
View Startup.cs
using System;
using System.Text;
using BackgroundServices;
using BackgroundServices.HttpClients;
using BackgroundServices.Options;
using BL;
using DAL;
using DAL.Models.Identity;
using DAL.Query.Abstraction;
using DAL.Query.AllCity;
@PadreSVK
PadreSVK / DummyRepository.cs
Last active Apr 12, 2021
Dummy repository implementation
View DummyRepository.cs
public interface IRepository<TEntity, in TId>
where TEntity : IEntity<TId>
{
Task<TEntity> GetById(TId id);
Task Insert(TEntity entity);
Task Update(TEntity entity);
Task Remove(TId id);
}
public interface IEntity<TId>
@PadreSVK
PadreSVK / extensions.json
Last active Mar 31, 2021
Sample of recommended extensions in vscode
View extensions.json
{
"recommendations": [
"octref.vetur",
"editorconfig.editorconfig",
"streetsidesoftware.code-spell-checker",
"josefpihrt-vscode.roslynator",
"mushan.vscode-paste-image",
"davidanson.vscode-markdownlint",
"ionutvmi.path-autocomplete",
"ban.spellright",
@PadreSVK
PadreSVK / .editorconfig
Last active Mar 16, 2021
Lint xml from cmd via prettier
View .editorconfig
[*]
end_of_line = crlf
charset = utf-8-bom
[*.{appxmanifest,axml,build,config,csproj,dbml,discomap,dtd,json,jsproj,lsproj,njsproj,nuspec,proj,props,resjson,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd}]
indent_style=space
indent_size=2
tab_width=2
max_line_length=200
@PadreSVK
PadreSVK / Directory.Build.props
Last active Jan 6, 2021
Infrastructure for append git metadata
View Directory.Build.props
<Project>
<PropertyGroup>
<Copyright>© 2021 Paradajka Paprika</Copyright>
<Authors>Paradajka Paprika</Authors>
<Company>Paradajka Paprika</Company>
<StableVersionBranch>master</StableVersionBranch>
<RepositoryUrl>https://dev.azure.com/mysuperorganization/GitMetadataInfrastructure/_git/GitMetadataInfrastructure</RepositoryUrl>
</PropertyGroup>
<ItemGroup>