Skip to content

Instantly share code, notes, and snippets.

Mike Chaliy (Mykhailo Chalyi) chaliy

Block or report user

Report or block chaliy

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
@chaliy
chaliy / Sample.proj
Created Aug 6, 2012
Code task to ZIP something
View Sample.proj
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0" DefaultTargets="Sample" >
<Import Project="Zip.targets" />
<Target Name="Sample" >
<Zip SourceFolder="C:\Users\Administrator.WIN-BOAS4C4GH8K\Projects\Temp" OutputFileName="package.zip" />
</Target>
</Project>
@chaliy
chaliy / non_blocking_api_dot_net.cs
Created Jul 27, 2010
Node.NET: Non blocking API .NET
View non_blocking_api_dot_net.cs
using System;
using System.IO;
using System.Net;
using System.Security.AccessControl;
using System.Text;
namespace SimpleExample
{
class Program
{
@chaliy
chaliy / az_acr_auth,sh
Last active Aug 30, 2018
Oneliner that replicates `aws ecr get-login` for `az acr`
View az_acr_auth,sh
az acr credential show -n mysuperpuperregistry \
--query "join(' ', ['docker login mysuperpuperregistry-on.azurecr.io', '-u', username, '-p', password])" \
--output tsv | sh
@chaliy
chaliy / Visual C++.sublime-build
Last active Aug 7, 2018
Visual C++ build system for Sublime Text
View Visual C++.sublime-build
{
"cmd": ["cl", "${file}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.cpp, source.c++",
// By default cl is not in your PATH, so add it to your path
// or uncomment "path" and check that it has correct value
//"path": "path:/to/folder/where/cl.exe/located",
"shell": true, // Without this sublime has hard times to parse "&" in out command line
@chaliy
chaliy / C#.sublime-build
Created Mar 18, 2012
Sublime Build to compile and run C# program
View C#.sublime-build
{
// This build system will build your cs file to exe file and will run it
"cmd": ["del ${file/\\.cs/\\.exe/} 2>NUL", "& csc /nologo /out:${file/\\.cs/\\.exe/} $file", "& ${file/\\.cs/\\.exe/}"],
"file_regex": "^(...*?)[(]([0-9]*),([0-9]*)[)]",
// By default csc is not in your PATH, so add it to your path
// or uncomment "path" and check that it has correct value
//"path": "C:/Windows/Microsoft.NET/Framework64/v4.0.30319/",
"shell": true, // Without this sublime has hard times to parse "&" in out command line
"selector": "source.cs"
}
@chaliy
chaliy / instfdnp.bat
Created Oct 19, 2013
Install FDNPKG tool for FreeDOS.
View instfdnp.bat
cd c:\freedos
wget http://downloads.sourceforge.net/project/fdnpkg/fdnpkg/v0.97/fdnpkg.zip
unzip fdnpkg.zip
View merge_sort.укр
процедура MergeSort (мод a: t) це
процедура Merge(арг a: t; Size: нат; рез b: t) це
змін i, j, k, r1, r2: нат;
поч
k <- 1;
поки k<=n повт
{визначення границь підмасивів}
i <- k; r1 <- i+Size-1;
якщо r1>n то r1 <- n кр;
j <- r1+1; r2 <- j+Size-1;
View watch_fsharpkoans.ps1
# You should have pswatch installed (http://psget.net/directory/pswatch/)
# You need small modification to the FSharpKoans/PathToEnlightenment.fs to make sure that you will not need to press any key
# Comment out
# printf "Press any key to continue..."
# System.Console.ReadKey() |> ignore
# 1. Open separate powershell window
# 2. Make sure you are in FSharpKoans solution folder
# 3. Run watch_fsharpkoans.ps1
# 4. Make both your visual studio and powershell window visitble at the same time
# 5. Enjoy!
View TaskExtensions.cs
namespace Utils
{
using System.Collections.Generic;
using System.Threading.Tasks;
public static class TaskExtensions
{
public static Task<T[]> WhenAll<T>(this IEnumerable<Task<T>> tasks)
{
return Task.WhenAll(tasks);
View SetupDev.ps1
cinst git
cinst gitextensions
cinst paint.net
cinst Inkscape
cinst skydrive
cinst sublimetext2
cinst VisualStudio2012Professional # requires modification to install web tools
cinst resharper
cinst winmerge
cinst 7zip
You can’t perform that action at this time.