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

the fact of real shit

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!Filed under: linux, php, redis Tagged: linux, php, redis
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 "".
Normal user privilege problem for using WiMax USB Modem in windows 7
Please follow the steps to get work for all of user of your computer -1. Install your modem with administrator account as usual normal installation. Nothing special while installation process.2. Now go to the folder where you installed your modem and change security settings.3. Add your user's for permit to use modem with read-write permission to that folders & its content's and sub-folders.4. Then go to windows firewall settings and add your modem software permit for both communication of home and public.