Skip to content

Instantly share code, notes, and snippets.

Code for music

Hamid Alaei Varnosfaderani halaei

Code for music
Block or report user

Report or block halaei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
halaei / nullable.php
Created Jul 22, 2019
Nullable helper
View nullable.php
class Nullable implements ArrayAccess, JsonSerializable
protected $value;
public function __construct($instance)
$this->value = $instance;
halaei / find-pattern.c
Last active Mar 3, 2018
find pattern in string
View find-pattern.c
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
* Hamming Weight
* Code from stackoverflow:
* @see
uint8_t numberOfSetBits(uint32_t i)
View pcntl_alarm.php
declare(ticks = 1);
class TimeoutException extends Exception {};
function signal_handler($signal) {
throw new TimeoutException();
halaei /
Created Jan 6, 2016 — forked from hollodotme/
Installing php7-fpm with phpredis extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](
add-apt-repository ppa:ondrej/php-7.0
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
You can’t perform that action at this time.