Skip to content

Instantly share code, notes, and snippets.

View vadim-kovalyov's full-sized avatar
🇺🇦
🤍❤️🤍

Vadim Kovalyov vadim-kovalyov

🇺🇦
🤍❤️🤍
  • Microsoft
  • Redmond, WA
View GitHub Profile
@vadim-kovalyov
vadim-kovalyov / bootstrap-ubuntu.sh
Last active August 18, 2023 03:59
Dev box setup for Ubuntu 20.04
sudo apt update
sudo apt install -y build-essential curl make git vim hub libssl-dev graphviz jq cmake clang pkg-config p7zip terminator gnome-tweaks fonts-firacode protobuf-compiler
# intune
sudo apt install libpam-pwquality
sudo nano /etc/pam.d/common-password
# password requisite pam_pwquality.so retry=3 dcredit=-1 ocredit=-1 ucredit=-1 lcredit=-1 minlen=12
curl -sSl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
function global:up { pushd ..\$args }
function global:up1 { pushd ..\$args }
function global:up2 { pushd ..\..\$args }
function global:up3 { pushd ..\..\..\$args }
function global:up4 { pushd ..\..\..\..\$args }
function global:up5 { pushd ..\..\..\..\..\$args }
function global:up6 { pushd ..\..\..\..\..\..\$args }
function global:up7 { pushd ..\..\..\..\..\..\..\$args }
function global:up8 { pushd ..\..\..\..\..\..\..\..\$args }
function global:up9 { pushd ..\..\..\..\..\..\..\..\..\$args }
@vadim-kovalyov
vadim-kovalyov / chocolatey.ps1
Last active May 9, 2020 00:17
Dev box setup with chocolatey
choco install dotnetcore -y
choco install dotnetcore-sdk -y
choco install powershell-core -y
choco install googlechrome -y
choco install sysinternals -y
choco install microsoft-edge -y
choco install vscode -y
choco install git -y
choco install visualstudio2019enterprise -y
choco install notepadplusplus -y

Keybase proof

I hereby claim:

  • I am vadim-kovalyov on github.
  • I am vadimkovalyov (https://keybase.io/vadimkovalyov) on keybase.
  • I have a public key whose fingerprint is 92B7 04BC EA09 69F1 CA5E FE1F 3EAF 958D 153E 1AC6

To claim this, I am signing this object:

@vadim-kovalyov
vadim-kovalyov / sp_help_dbrecovery.sql
Last active October 21, 2016 21:33
Stored Proc that generates RESTORE scripts from a set of backups created by Ola's Hallengren maintenance scripts.
-- This stored proc was developed based on the backup naming and folder convention from
-- https://ola.hallengren.com/ Maintenance Solution (as of 28 September, 2016).
-- It solely relies on files in the folder, it does not query MSDB, since it is
-- designed to work with Availability Groups (which may not have one single source of backup history).
-- Give it a database name and a backup root folder that you specified in Ola's Maintenance Solution script
-- and it will produce a sequence of RESTORE commands:
-- * Starting from MOST RECENT full backup,
-- * Then MOST RECENT diff backup (if exists)
-- * Then all T-Log backups after the last FULL/DIFF backup.
@vadim-kovalyov
vadim-kovalyov / .gitconfig
Created August 30, 2016 17:18
How to enable TortoiseGitMerge as an external diff/merge tool in Visual Studio 2015
#Add this into your local (.git/config) or global (%USER_HOME%/.gitconfig) git config file.
[diff]
tool = tgm
[difftool "tgm"]
cmd = \"C:\\Program Files\\TortoiseGit\\bin\\TortoiseGitMerge.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = tgm
[mergetool "tgm"]
cmd = \"C:\\Program Files\\TortoiseGit\\bin\\TortoiseGitMerge.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
@vadim-kovalyov
vadim-kovalyov / XmlSerializer.cs
Created June 9, 2016 14:19
Standard helper for XML Serialization
using System.IO;
using System.Xml.Serialization;
namespace Common
{
/// <summary>
/// XML Serialization utils.
/// </summary>
public static class XmlSerializer
{
@vadim-kovalyov
vadim-kovalyov / Register-Host.ps1
Created May 23, 2016 18:53
Creates a record in host file.
#
# Creates a record in host file.
#
function Register-Host
{
param([string]$IpAddress = "127.0.0.1", [string]$Url)
$hostfile = "$env:SystemRoot\System32\drivers\etc\hosts"
$content = "$IpAddress $Url"
@vadim-kovalyov
vadim-kovalyov / Create-IisVirtualDirectory.ps1
Created May 23, 2016 18:52
Creates a virtual directiry in the specified website.
#
# Creates a virtual directiry in the specified website.
#
function Create-IisVirtualDirectory
{
param([string]$DirName, [string]$SiteName, [string]$DirectoryPath)
Import-Module WebAdministration
cd IIS:\
@vadim-kovalyov
vadim-kovalyov / Create-IisSite.ps1
Created May 23, 2016 18:51
Creates a website and an app pool in IIS.
#
# Creates a website and an app pool in IIS.
#
function Create-IisSite
{
param([string]$SiteName, [string]$Url, [string]$DirectoryPath, [string]$AppPoolDotNetVersion = "v4.0")
Import-Module WebAdministration
$iisAppPoolName = $SiteName