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 \