Smaller – Batch minify HTML, PHP, CSS and JavaScript on the Mac

Honestly, I was looking into JavaScript, HTML & CSS minifiers for my production usage, definitely my preferences were not to visit online-minifier’s website every time I need some minification, something has faster usability, something sells soft obfuscation (‘Packer’ is slow!), something does the work in a batch, merges all in a one (save HTTP requests!), something replaces the original (I don’t want renaming the file with “.min” etc.).

You know, some unplanned tweaking in the CSS/JS occurs at the last moment to/after deploy and non-automated minification of your static files really sucks that time. Better we may use some kind of automatic or semi-automatic automation for those repetitive tasks to buy some time.

Something about the other minifiers bothered me that, those were not ready for production usages like elimination of conditional HTML statements (IE hacks!), non-batch, some were only for JS or CSS etc.

Later I found Smaller, I drag and drop my entire template/layout directory and have my contents minified replacing the original, found handy in my case and a recommended app for Mac.

BTW, I found some backward compatibility issue with it and was not being able to use their latest version (1.3.5) in my Snow Leopard 10.6.8. I call for a support, the lead dev Chen Luo promptly responded “Smaller 1.3.5 was built with Xcode 4.4 but Apple removed OS X 10.6 SDK since then”.  So, 1.3.4 is working for me and haven’t missed much from 1.3.5.

Disclosure: I have written this review in exchange of a license of “Smaller”.

Setting your PHP development environment in Ubuntu

Instead of installing each item separately we will go with installing LAMP server in a package in Ubuntu that is fairly simple along with a single terminal command:

sudo apt-get install lamp-server^

The apt-get command is a powerful command-line tool used to work with Ubuntu’s Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.

sudo used to invoke the current user with the power of super user and a caret ‘^’ symbol placed after package name to indicate performing as tasks together.

The LAMP package will start installing immediately with above command including latest PHP5, Apache 2, MySQL and PHP5-MySQL. By default apache2 and MySQL installed as service and your document root will be at /var/www/

An index.html file shall be there.

Both Apache and MySQL should be running. However, you may start apache by using service start command as

sudo service apache2 start

and stop apache by using:

sudo service apache2 stop

Checking the LAMP installation:

Point your browser to http://localhost/ you will see the default apache2 landing page which means your webserver apache2 is running. Still you can check those service statuses as below:

sudo service apache2 status

you will be shown

Apache is running. Process #

Again to check MySQL status, simple run the command

sudo service mysql status

you will be shown

mysql start/running. Process #

to check the PHP installation simple create a file named test.php, in /var/www/ with the below line:

<?php phpinfo(); ?>

Now point your browser with http://localhost/test.php and you will see the installed PHP and components configuration details.

Installing PhpMyAdmin:

To maintain MySQL database functionality using web based interface we may use phpMyAdmin.

sudo apt-get install phpmyadmin

phpMyAdmin will be installed with the above command and during installation you will receive a blue window asking which server you want to use i.e. apache2, lighttpd ;  choose apache2 and click ok to continue with the installation. After installation point your browser with http://localhost/phpmyadmin/ and you will be viewing phpMyAdmin landing page.

If you receive 404 error at http://localhost/phpmyadmin/ then you need to setup phpMyAdmin under apache manually by modifying /etc/apache2/apache2.conf using gedit

sudo gedit  /etc/apache2/apache2.conf

gedit will open the file in graphical mode and add the below line at bottom inside apache2.conf

Include /etc/phpmyadmin/apache.conf

Now restart apache server to make the changes effective.

sudo service apache2 restart

Now refresh your browser and you will have phpMyAdmin login screen.

BASIS SoftEXPO 2012 Tech session: Build Social Apps for Facebook

The below application created to describe simple Facebook social plugins usage and how to develop a Facebook app from scratch.

The demo Facebook application : BookStall

The Entire Facebook application source code can be downloaded from here:

Virtual bookstall project source codes

screen-casts will be added soon :) [N.B: 44 minutes screen-casts are too heavy to upload, skipped this]

This above session has been presented at BASIS SoftEXPO 2012

My Blog in 2011 review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 13,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 5 sold-out performances for that many people to see it.

Click here to see the complete report.

booklet cover copy

PhpXperts Seminar 2011 – follow up

17th December 2011, on tech premises at the heart of Dhaka, the largest tech seminar took place once again featuring latest web trends and interesting PHP sessions brought by the experts from the industry. In this 5th annual program of phpXperts, more than 500 developers, open source enthusiasts, journalists, students, geeks joined the daylong event to inhabit the tech gathering which finally became huge success and significant in the local PHP community.

This long awaited annual program included with a new addition of short sessions of 6 minutes each along with regular sessions with speakers and the sponsors presented their companies or projects within the event frame. The pretty item in the seminar was the quiz session after each two speaking and winners were awarded with many exciting gadgets.

Basically openness & friendliness of phpXperts community became the icon of tech community of the country, more auspicious developers have been stimulated from the phpXperts. This enormous tech group feeds heavy input to local web industry and the web generation of Bangladesh.

Hasin Hayder, the man behind the scene, doing the hard work as founder-moderator of the group and the mentor to local PHP community.

Seminar references are as below:

.

Sessions with Speakers

Lets have some fun with – Twilio & OpenTok APIMizanur Rahman

Get Excited! Enterprise Search Solutions at your FingerTipsMurshed Ahmmad Khan

Dependency Injection, Reinventing how you manage PHP classesRifat Nabi

Setting up Amazon EC2 Servers: Make Your Server Elastic!Tahsin Hasan

Continuous feature integration in large projectsNHM Tanveer Hasan Khan & Nafi ul karim

MongoDB, a document store that won’t let you down!Nurul Ferdous

Getting Up and running with Zend FrameworkMd. Shoriful Islam Ronju & Saidur Rahman Bijon

A Brief Intro to the Symfony Application Framework v2.xLoban Amaan Rahman

Screencast: http://www.youtube.com/watch?v=ENR3qXdNOXY

Taking Advantage of Client Side / JavaScript Templates in Rich Internet Applications. – M. Mahbubur Rahman

Hybrid authentication and talking to social networksRayhan Chowdhury

Supervisor, Gearman and PHP – Job management with sanity!Abu Ashraf Masnun

Mystery of cryptography, ciphers and the dark side of the moonHasin Hayder & M A Hossain Tonu

.

6 minutes of Fame

Smelling Your CodeRaju Mazumder

WordPress plugin / theme development best practicesTareq Hasan

Flying on the cloudImran Hossain Shaon

Rapid facebook application development using LightBulb – Md. Alamgir Hossain Rinku

ZCE – Inside OutShehzad Noor Taus

RESTful Web ServicesMd. Eftakhairul Islam Rain

Download all the presentation slides:

http://seminar2011.phpxperts.net/phpXperts%20Slide%202011.zip

Seminar booklet:

Cover Design of the booklet of phpXperts

Photo Albums:

http://www.facebook.com/media/set/?set=a.10151054439780608.776901.584190607&type=1

http://www.facebook.com/media/set/?set=a.2830854448579.148339.1175663829&type=3

Seminar follow up in Bengali:

http://www.techtunes.com.bd/reports/tune-id/102066/

Cheers :)