Skip to content

Instantly share code, notes, and snippets.

Sergii Iarovyi iarovyi

Block or report user

Report or block iarovyi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
iarovyi / HTTPServer.ps1
Created Dec 10, 2019 — forked from jakobii/HTTPServer.ps1
A Basic Powershell Webserver
View HTTPServer.ps1
# You Should be able to Copy and Paste this into a powershell terminal and it should just work.
# To end the loop you have to kill the powershell terminal. ctrl-c wont work :/
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
iarovyi / InstallDefaults.ps1
Last active Oct 10, 2019
Install base software for .NET developer
View InstallDefaults.ps1
Installs basic software for .NET developer
.PARAMETER IncludePaid
Install paied software that requires specifying license afterwards
.\InstallDefaults.ps1 -IncludePaid
param (

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.


The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

View Read-Write KMS keys
I) Sign executable:
.\Signing-Utilities.ps1 -CommaSeparatedFilesToSign "D:\FilesToSign\one.exe,D:\FilesToSign\two.exe"
II) Upload or update signing key:
Initialize-AWSDefaults -ProfileName !!!!!!!!!!!!!!!!! -Region eu-west-1 #Different profile for production
. .\Signing-Utilities.ps1
UploadSigningKey -SigningKeyPath "C:\Users\s.larovyi\Desktop\KMS\testKey.pfx" -Password "secret"
List of saved values:
View OData
public class RailwayStationsController : ApiController
public IQueryable<RailwayStationModel> GetAll()
return testData.AsQueryable();
iarovyi / CustomTaskConsoleApplication
Created Oct 7, 2014
View CustomTaskConsoleApplication
using System;
using System.Runtime.CompilerServices;
using System.Threading;
namespace CustomTaskConsoleApplication
class Program
static void Main(string[] args)
View C#_expression.cs
Expression<Func<string, bool>> f = s => s.Length < 5;
ParameterExpression p = Expression.Parameter (typeof (string), "s");
MemberExpression stringLength = Expression.Property (p, "Length");
ConstantExpression five = Expression.Constant (5);
BinaryExpression comparison = Expression.LessThan(stringLength, five);
Expression<Func<string, bool>> lambda = Expression.Lambda<Func<string, bool>> (comparison, p);
Func<string, bool> runnable = lambda.Compile();
iarovyi / sandbox.cs
Created May 17, 2014
Sandbox - sandbox for plugin
View sandbox.cs
string pluginFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "plugins");
string plugInPath = Path.Combine(pluginFolder, "plugin.exe");
PermissionSet ps = new PermissionSet(PermissionState.None);
ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution));
ps.AddPermission(new FileIOPermission(FileIOPermissionAccess.PathDiscovery | FileIOPermissionAccess.Read, plugInPath));
ps.AddPermission(new UIPermission(PermissionState.Unrestricted));
AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation;
AppDomain sandbox = AppDomain.CreateDomain("sbox", null, setup, ps);
iarovyi / Disassembler.cs
Created May 16, 2014
Disassembler - get MSIL as string
View Disassembler.cs
class Disassembler
private static MethodBase GetCallingMethod()
return new StackFrame(2, false).GetMethod();
public static string DisassembleCurrentMethod()
iarovyi / BitwiseMath
Last active Aug 29, 2015
BitwiseMath - fun with bitwise operations
View BitwiseMath
using System;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
namespace SortingExtensions.Demo.Trash
Another handy syntax
You can’t perform that action at this time.