Skip to content

Instantly share code, notes, and snippets.

View ermik's full-sized avatar
🍫
Where no one has gone before

Ermolay Romanov ermik

🍫
Where no one has gone before
View GitHub Profile
Add-WindowsCapability -Online -Name OpenSSH.Client
Add-WindowsCapability -Online -Name OpenSSH.Server
New-NetFirewallRule -Name SSH -DisplayName 'OpenSSH SSH Server Port' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program "C:\System32\OpenSSH\sshd.exe"
Set-Service -Name sshd -StartupType 'Automatic'
Start-Service sshd
type CtorFunc<T extends new (...args: any[]) => any> = T extends new (...args: infer A) => infer R
? (...args: A) => R
: never;
type CtorArgs<T extends new (...args: any[]) => any> = T extends new (...args: infer A) => infer R
? A
: never;
type Ctor<T extends new (...args: any[]) => any> = T extends new (...args: infer A) => infer R
? { new (...args: A): R }
@ermik
ermik / GKScene+Frameworks.swift
Created June 14, 2019 00:25
GKScene extension for framework-local GameplayKit scene assets
/// Adds a convenience initializer for loading scenes from framework targets.
public extension GKScene {
/// Loads the bundle-specific SpriteKit scene file, creating a GKScene object containing the SpriteKit scene and associated GameplayKit objects.
/// - Parameters:
/// - filename: The name of a scene file in the given bundle.
/// - bundle: The bundle containing the scene file.
///
/// - Returns: A new GameplayKit scene.
///
@ermik
ermik / proposal.kt
Created May 4, 2019 00:38
Accessing existing RIBs libraries from pure-Kotlin code via Kotlin Wrapper
// I did not separate this gist into multiple "files" because all this
// code is drafted in Kotlin and explains a single thought.
//
//
// --------------------------------------------------
// Wrapper package, commonMain (can't import Java RIBs)
// It's a KMP project but is meant to be a library for other KMPs
// --------------------------------------------------
package com.uber.rib.native
@ermik
ermik / ChangePasswordViewController.swift
Last active April 28, 2019 00:20 — forked from JUSTINMKAUFMAN/Shared.kt
Shared RIB Interface ('ChangePassword' Example)
// --------------------------------------------------------------------
// ChangePasswordViewController.swift
// --------------------------------------------------------------------
import ChangePasswordShared
import RxCocoa
import RxSwift
import UIKit
@ermik
ermik / keybase.md
Created September 27, 2018 19:40
Keybase

Keybase proof

I hereby claim:

  • I am ermik on github.
  • I am ermolay (https://keybase.io/ermolay) on keybase.
  • I have a public key ASB1gsVEC82OhnA3B3AUSmEgWjD_l3LT1DJmAHwWF2RfkAo

To claim this, I am signing this object:

@ermik
ermik / endpoints.go
Created August 5, 2018 14:09
Ignoring
// There are existing structs for Request -> Response dataflow as well as
// a struct for the Product;
//
// In this case we are mapping the Input type to a Request type see yaml and grapqql files
//
// Here's the struct we map to:
type CreateProductRequest struct {
Name string `json:"name"`
GTIN string `json:"gtin"`
@ermik
ermik / Snail.Error.Ermik
Created June 14, 2013 21:22
Error for Snail UI Stable [WoWInterface 15.06.13]. Mac OSX 10.8 Retina Display.
Message: Interface\AddOns\SnailUI\SnailUI.lua:63: attempt to call global 'HandleTooltip' (a nil value)
Time: Sat Jun 15 01:20:21 2013
Count: 1
Stack: Interface\AddOns\SnailUI\SnailUI.lua:63: in function `func'
Interface\AddOns\oUF\factory.lua:20: in function <Interface\AddOns\oUF\factory.lua:16>
(tail call): ?
Locals: Self = <table> {
DisableBlizzard = <function> defined @Interface\AddOns\oUF\blizzard.lua:44
SetActiveStyle = <function> defined @Interface\AddOns\oUF\ouf.lua:324