Skip to content

Instantly share code, notes, and snippets.

View habibun's full-sized avatar

Habibun Noby habibun

View GitHub Profile
@habibun
habibun / gist:01c94a5e077d7cd2bb58678f9a2a6bf4
Created September 28, 2017 09:04
Composer work around PHP version (*.*.*) does not satisfy that requirement.
composer install --ignore-platform-reqs
@habibun
habibun / Dockerfile
Last active December 13, 2017 11:12
docker configuration for symfony 3.4.1 in ubuntu 14.04
FROM php:latest
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN apt-get update && apt-get install -y git zlib1g-dev
RUN docker-php-ext-install zip && docker-php-ext-enable zip
RUN mkdir -p /var/www
RUN composer create-project symfony/framework-standard-edition /var/www/
RUN chmod +x /var/www/bin/console
EXPOSE 8080
CMD /var/www/bin/console server:run 0.0.0.0:8080
VOLUME /var/www/
@habibun
habibun / sources.list
Created December 24, 2017 16:51
Ubuntu 16.04.3 LTS
# deb cdrom:[Ubuntu-GNOME 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215)]/ xenial main multiverse restricted universe
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirror.dhakacom.com/ubuntu-archive/ xenial main restricted
# deb-src http://bd.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirror.dhakacom.com/ubuntu-archive/ xenial-updates main restricted
@habibun
habibun / MP4Box
Created December 27, 2017 09:24
Merge multiple mp4 files into a single video via the terminal
MP4Box -cat a.mp4 -cat b.mp4 -cat c.mp4 -cat d.mp4 -cat e.mp4 -new joinedfile.mp4
@habibun
habibun / allCommandsInLine
Created February 2, 2018 17:48
Remove mysql 5.7 completely in ubuntu 16.04
sudo service mysql stop && sudo killall -9 mysql && sudo killall -9 mysqld && sudo apt-get remove --purge mysql-server mysql-client mysql-common && sudo apt-get autoremove && sudo apt-get autoclean && sudo deluser mysql && sudo rm -rf /var/lib/mysql && sudo apt-get purge mysql-server-core-5.5 && sudo apt-get purge mysql-client-core-5.5 && sudo rm -rf /var/log/mysql && sudo rm -rf /etc/mysql
@habibun
habibun / PHP-CS-Fixer-Symfony
Last active March 26, 2018 06:17
PHP-CS-Fixer - PHPStorm with Symfony - Configuration as External Tools
Name: PHP-CS-Fixer Symfony
Program: php-cs-fixer
Arguments: --rules=@Symfony --verbose fix $FileDir$/$FileName$
Working Directory: $ProjectFileDir$
@habibun
habibun / FOREIGN_KEY_CHECKS.sql
Created February 10, 2018 05:29
Cannot add foreign key constraint
SET FOREIGN_KEY_CHECKS=0;
@habibun
habibun / symfonyAllRouter
Last active April 10, 2018 09:07
Symfony show all router with controller
php app/console debug:router --show-controllers
@habibun
habibun / gist:c1df00220cdcda212b844b52e66bf9e6
Last active April 11, 2018 04:53
Download youtube playlist and convert to mp3
youtube-dl --ignore-errors --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" yourPlaylistUrl
@habibun
habibun / 20-xdebug.ini
Created November 19, 2018 09:32
Xdebug configuration with phpstorm file linking symfony
zend_extension=/usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300
xdebug.idekey=PHPSTORM
xdebug.remote_autostart=1
xdebug.profiler_enable=1