Skip to content

Instantly share code, notes, and snippets.

View infinite-system's full-sized avatar
🏠
Working from home

Evgeny Kalashnikov infinite-system

🏠
Working from home
  • Infinite System
  • Toronto, Canada
View GitHub Profile
@infinite-system
infinite-system / Kernel.ts
Last active August 25, 2023 15:23
Basic IOC container similar to Inversify
class Mapping {
constructor (public from: ObjectConstructor) {
this.to = from
}
to: ObjectConstructor
scope = 'singleton'
onActivation: (resolved, ...args) => {}
}
export class Kernel {
@infinite-system
infinite-system / watch.php
Created June 17, 2022 19:56 — forked from leocavalcante/watch.php
Watch script for Swoole HTTP server restarts.
<?php declare(strict_types=1);
require_once __DIR__.'/vendor/autoload.php';
use Symfony\Component\Process\Process;
$process = new Process(['php', 'index.php']);
echo "Starting process\n";
$process->start();