Shahadat Hossain Khan Razon
Office Address: City Center (Motijheel), Dhaka, BD

the fact of real shit

new home
please visit my new shouting area – Advertisements
change mysql data directory ubuntu 17.xx
Follow NOTE: you can skip empty directory (/var/lib/mysql/mysql) creation script in ubuntu 17.xx version. Then try to start mysql server. If fail then log messages are telling you that /usr/sbin/mysqld needs read (r) access to open /proc/14767/status, /sys/devices/system/node/ (trailing slash because it wants to read the directory), and /proc/14767/task/14767/mem. The file to edit is /etc/apparmor.d/usr.sbin.mysqld. […]
network adapter at guest [ubuntu] while setup host only network at virtualbox
I’m trying to setup host only network at virtualbox by following but facing to choice network adapter at guest [ubuntu] To see a list of the adapters your virtual machine can access, use this: ls /sys/class/net This will show you the interface names. For example, with two network adapters set up, my Ubuntu guest […]
JavaScript class encaptulation
My favorite JavaScript class structure – (function(exports) { "use strict"; var mySuperDupparClassOfSHKR=function(pValue){ var myPrivateValue; this.setValue=function(pValue){ myPrivateValue=pValue; return this; }; var __construct = function(that, pValue) { return that.setValue(pValue); }(this, pValue); }; exports.SuperDupparClass = { create : function(pValue) { if(typeof pValue==='undefined') throw 'please provide a value, unable to continue...'; return new mySuperDupparClassOfSHKR(pValue); }, }; })(this); Usage as […]
Install PHP-Redis on PHP5.6 Centos 7
Assume that PHP 5.6 installed and working properly. Now execute following command sudo yum install php56w-devel sudo yum install git-core git clone git:// cd phpredis/ sudo phpize sudo ./configure sudo make sudo make install sudo echo "">/etc/php.d/redis.ini sudo apachectl restart Its pretty simple!
PHP Archive (.phar) Attaching with ZF2
PHP archive aka phar is a stream wrapper which can serve any packaged PHP library efficiently. To create a phar document for a library (not for web output or for cli executable) is simple as pie like – $phar = new \Phar('target-location-where-to-save.phar', FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::KEY_AS_FILENAME, 'optionalPharAliasName'); $phar->buildFromDirectory('source/lib/path'); After creating phar document, file can use to attach […]
PHP Debug efficiently with debug_backtrace
Hello today I write a small function for debug your PHP code. Its simple but powerful – $bkTrace=function ($stack) { $output = ''; $stackLen = count($stack); for ($i = 1; $i < $stackLen; $i++) { $entry = $stack[$i]; $func = (array_key_exists('class', $entry)?$entry['class'].'\\':'').$entry['function'] . '('; $argsLen = count($entry['args']); for ($j = 0; $j < $argsLen; $j++) { […]
Image size for social media (like facebook, twitter, google+, linkedin, pinterest, instagram, youtube) profile and other picture
As we faced many problem to work in social media about size of profile picture to use. Here is the dimension that analysis by renowned email marketing tools provider constant contact. Also I add some value to enrich the list – Facebook ———————— Cover photo 815×315 Profile photo 180×180 (display area 160×160) Fan page profile […]
Batch file that will create skeleton directories of ZF2
After a long time write a batch file to create a skeleton directory for Zend Framework 2 module. Hope it may help someone who work in windows 7 OS @echo off @setlocal ENABLEDELAYEDEXPANSION @rem this file will create required empty directory of a ZF2 module @rem author Shahadat Hossain Khan ( ECHO. IF "%~1"=="" GOTO […]
Install Zend Framework 2 into Windows IIS
Install ZF2 into IIS is very easy just within few steps. You all need the latest version of ZF2 and latest version of ZF2 Skeleton and latest version of PHP. After that copy ZF2 into certain path of ZF2 skeleton's vendor directory.