Skip to content

Instantly share code, notes, and snippets.

View nikolay-pshenichny's full-sized avatar

Nikolay Pshenichnyy nikolay-pshenichny

View GitHub Profile
@nikolay-pshenichny
nikolay-pshenichny / passmade.md
Created March 11, 2016 01:17
"PASSMADE" acronym

PASSMADE. Acronym

  • Performance
  • Availability
  • Security
  • Scalability
  • Maintainability
  • Accessibility
  • Deployability
@nikolay-pshenichny
nikolay-pshenichny / Repository.cs
Created October 2, 2015 00:16
Bulk Insert with LINQ to SQL
using DataAccess.Extensions;
using System.Collections.Generic;
namespace DataAccess.Repositories
{
public class Repository : IRepository
{
private readonly System.Data.Linq.DataContext _dataContext;
public Repository(System.Data.Linq.DataContext dataContext)
@nikolay-pshenichny
nikolay-pshenichny / fetch-data-from-all-tables.sql
Created September 15, 2015 01:17
Fetch data from all tables (MS SQL)
declare @table_name varchar(200);
declare @table_object_id int;
declare @primary_key_column_name varchar(200);
declare all_tables cursor for select name, object_id from sys.tables order by name
open all_tables
fetch next from all_tables into @table_name , @table_object_id
@nikolay-pshenichny
nikolay-pshenichny / leNuGet_profile.ps1
Created July 17, 2015 17:33
Visual Studio powershell profile [Package Manager Console powershell profile]
#
# Powershell profile for the Package Manager Console (Visual Studio)
# How to setup - https://docs.nuget.org/consume/Setting-up-NuGet-PowerShell-Profile.md
#
# History:
# 7/17/2015:
# - Posh-Git - Expected to be in C:\Src\posh-git\
# - Aliases for GitExtensions;
# - Aliases for Git;
# - Aliases for a vs solution directories.
@nikolay-pshenichny
nikolay-pshenichny / install.ps1
Created May 9, 2015 01:49
Modify "Conditional compilation symbols" from NuGet install.ps1 script
param($installPath, $toolsPath, $package, $project)
if ($project -ne $null)
{
$configuration = $project.ConfigurationManager | Where-Object {$_.ConfigurationName -eq "Debug"}
if ($configuration -ne $null)
{
$oldValue = $configuration.Properties.Item("DefineConstants").Value
@nikolay-pshenichny
nikolay-pshenichny / ConvertFrom-DotSettings.ps1
Last active October 29, 2015 13:21
PowerShell script to convert filter settings from DotSettings to XML
<#
.SYNOPSIS
Converts *.sln.DotSettings file to xml format suitable to be used with dotcover from command line
.DESCRIPTION
Converts DotSettings file (created from DotCover VS Extension) to its xml representation that can be used with dotcover from command line
.PARAMETER inputFileath
A xxx.sln.DotSettings file