Shahadat Hossain Khan Razon
Office Address: 450/A # South Goran (2nd Fl.), Dhaka

the fact of real shit

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.
ckeditor installation into drupal with imce
As a professional app developer, I faced to install ckeditor into drupal many times. Each times I need to dig again and again to its working. So, now I think I have to write it down that will help me and others too 😉 Install ckeditor into Drupal with IMCE Its simple two step > […]
pure-ftpd status error– dead but subsys locked
I start digging the init script and perl script for the problem. And find that in init script there has line which checking the status of "" not pure-ftpd daemon!!! So, I just change to check the status of pure-ftpd instead checking status of "".