Skip to content

Instantly share code, notes, and snippets.

View alihamidali's full-sized avatar
🎯
Focusing

Hamid Ali alihamidali

🎯
Focusing
View GitHub Profile
@hoandang
hoandang / php-docker-ext
Created May 20, 2017 01:12
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@cerbero90
cerbero90 / AbstractValidator.php
Created October 2, 2014 18:22
Validation as a service in Laravel
# app/validation/AbstractValidator.php
<?php namespace YourApp\Validation;
/**
* Abstract implementation of a validator.
*
* @author Andrea Marco Sartori
*/
abstract class AbstractValidator implements ValidatorInterface
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@ain
ain / log.php
Created February 23, 2012 19:47
tail functionality in PHP
<?php
// full path to text file
define("TEXT_FILE", "/home/www/default-error.log");
// number of lines to read from the end of file
define("LINES_COUNT", 10);
function read_file($file, $lines) {
//global $fsize;