Skip to content

Instantly share code, notes, and snippets.

<?php

$list = [ 1, 2, 3, 4, 5 ];

function dumpArray( array $list )
{
    foreach ( $list as $key => $value )
    {
<?php

function countup( $steps )
{

    // Internal State
    $counter = 1;   

    $run = function() use ( $steps, &$counter, &$run )
class Scheduler
{

	protected $actions = [];

	function invoke( $func, $deadline )
	{
		$this->actions[] = [ "deadline" => $deadline, "func" => $func ];
	}
#pragma once

using namespace std;

class Node
{

public:
	

Dockerfile

FROM centos
LABEL maintainer "[email protected]" 
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
RUN rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-8.rpm
RUN yum update -y
RUN yum install unzip php74 php74-php php74-php-fpm php74-php-pecl-mysql php74-php-mcrypt php74-php-mbstring php74-php-pdo php74-php-xml php74-php-pecl-zip php74-php-common php74-php-pecl-crypto -y
RUN ln -s /usr/bin/php74 /usr/bin/php
@nezarfadle
nezarfadle / index.html.md
Last active May 4, 2020 18:56
PHP Server Send Events
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
#include <iostream>
#include "assert.h"
#include <exception>

using namespace std;

class EmptyStackException : public std::exception {};
class FullStackException : public std::exception {};
template<class T, int max>
<?php

interface IObserver
{
    public function run( $o );
}

interface IObservable
{
[
{
"description":"Flower",
"image":"https://i.pinimg.com/originals/9d/0e/95/9d0e95a207231b44c265a8fef32d7127.jpg"
},
{
"description":"Car",
"image":"https://i.pinimg.com/originals/3c/d7/0c/3cd70ca19d90589c9b01d5ed8d16f417.png"
}
]