Skip to content

Instantly share code, notes, and snippets.

View chaliy's full-sized avatar

Mykhailo Chalyi (Mike Chaliy) chaliy

  • Ukraine, Lviv
  • 19:41 (UTC +03:00)
  • X @chaliy
View GitHub Profile
@chaliy
chaliy / hello_world.ps1
Created April 8, 2011 09:40
Hello World from PowerShell
write-host "Hello World!"
# Герератор базових математичних завданнь
zlib-devel.x86_64 1.2.7-18.amzn2 @amzn2-core
zlib.x86_64 1.2.7-18.amzn2 installed
zip.x86_64 3.0-11.amzn2.0.2 @amzn2-core
yum-plugin-priorities.noarch 1.1.31-46.amzn2.0.1 installed
yum-plugin-ovl.noarch 1.1.31-46.amzn2.0.1 installed
yum-metadata-parser.x86_64 1.1.4-10.amzn2.0.2 installed
yum.noarch 3.4.3-158.amzn2.0.5 installed
yarn.noarch 1.22.15-1 @yarn
xz-lzma-compat.x86_64 5.2.2-1.amzn2.0.2 @amzn2-core
xz-libs.x86_64 5.2.2-1.amzn2.0.2 installed
# Flux2 install for Kubernetes v1.15.0
flux install --export --watch-all-namespaces=false -n {{inputs.parameters.namespace}} | \
yq4 e 'select(.kind == "CustomResourceDefinition").apiVersion = "apiextensions.k8s.io/v1beta1"' - | \
yq4 e 'select(.kind == "CustomResourceDefinition").spec.additionalPrinterColumns = select(.kind == "CustomResourceDefinition").spec.versions[0].additionalPrinterColumns' - | \
yq4 e 'del(select(.kind == "CustomResourceDefinition").spec.versions[].additionalPrinterColumns)' - | \
yq4 e 'select(.kind == "CustomResourceDefinition").spec.validation = select(.kind == "CustomResourceDefinition").spec.versions[0].schema' - | \
yq4 e 'del(select(.kind == "CustomResourceDefinition").spec.versions[0].schema)' - | \
yq4 e 'select(.kind == "CustomResourceDefinition").spec.subresources = select(.kind == "CustomResourceDefinition").spec.versions[0].subresources' - | \
yq4 e 'del(select(.kind == "CustomResourceDe
@chaliy
chaliy / Sample.proj
Created August 6, 2012 09:08
Code task to ZIP something
<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 July 27, 2010 14:55
Node.NET: Non blocking API .NET
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 August 30, 2018 20:30
Oneliner that replicates `aws ecr get-login` for `az acr`
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 August 7, 2018 21:25
Visual C++ build system for Sublime Text
{
"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 March 18, 2012 21:17
Sublime Build to compile and run C# program
{
// 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 October 19, 2013 18:22
Install FDNPKG tool for FreeDOS.
cd c:\freedos
wget http://downloads.sourceforge.net/project/fdnpkg/fdnpkg/v0.97/fdnpkg.zip
unzip fdnpkg.zip