Skip to content

Instantly share code, notes, and snippets.

View alksily's full-sized avatar
🏠
Working from home

Aleksey Ilyin alksily

🏠
Working from home
View GitHub Profile
@alksily
alksily / Snowflake.php
Created March 1, 2019 12:27
Snowflake
<?php
define('EPOCH', 1414213562373);
define('NUMWORKERBITS', 10);
define('NUMSEQUENCEBITS', 12);
define('MAXWORKERID', (-1 ^ (-1 << NUMWORKERBITS)));
define('MAXSEQUENCE', (-1 ^ (-1 << NUMSEQUENCEBITS)));
class Snowflake
@alksily
alksily / README.md
Created November 10, 2019 11:50
How install push stream module for nginx on debian, ubuntu

Install NGINX with nginx-push-stream-module

Gist for Ubuntu and Debian users

Easy

nginx 1.16.1 + push stream module latest

apt-get update -y \
@alksily
alksily / ml-dots.html
Last active May 27, 2026 09:37
Neural network in just 300 lines of JavaScript
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Live Demo</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;700&family=Space+Grotesk:wght@300;500;700&display=swap');
* {
margin: 0;