Posts tagged with tutorial

  • Create a simple Highcharts bar chart with real time update

    I need to use Highcharts for one of my recent projects to show the voting results. The library is very easy to use and flexible :)

    Below is an example of how to set it up to create a simple bar chart and customize its labels:

    1.  var pollChart;
    2.      $(document).ready(function() {
    3.          var colors = Highcharts.getOptions().colors;
    4.          var teamsJson = [{"name":"Team A","voteCount":"98"},
    5.                                {"name":"Team B","voteCount":"32"},
    6.                        {"name":"Team C ","voteCount":"45"}] ;
    7.          // use...
    Read More
  • Node.js deployment in production settings

    While node.js is exciting, it is clear that it is not a solution for everything. In particular, it would be a very bad idea to use node.js for content management systems. It would take too much efforts to write a CMS based in Node.js from scratch comparing to other mature CMS in PHP/Java/.Net/Python. Personally, I also feel Node.js is not suited for the standard CRUD apps yet. There is no big frameworks built on top of Node.js which give you features such as ORM for multiple databases, code generation, security handling, user management and...

    Read More
  • PHP extensions installation in Centos 6

    Below is my note on installing the common extensions (assuming php-pear has been yum installed):

    ImageMagick

    $ yum install gcc
    $ yum -y install php-devel
    
    # install imagemagick binary
    $ yum install ImageMagick
    $ yum install ImageMagick-devel
    
    # install php extension
    $ pecl install imagick
    
    # update configuration file
    $ echo "extension=imagick.so" > /etc/php.d/imagick.ini
    
    # restart httpd 
    $ sudo service httpd restart
    

    MCrypt

    # install Epel repo for yum
    $ sudo rpm -ivh...
    Read More
  • Centos 6 LAMP setup

    This is to document the whole setup process.

    Apache

    # update yum
    $ yum update
    
    # install httpd
    $ yum install httpd
    
    # start httpd at system start
    $ /sbin/chkconfig --levels 235 httpd on
    
    # start Apache
    $ service httpd start
    

    MySQL

    # install mysql
    $ yum install mysql-server
    
    # start mysql on system startup
    $ /sbin/chkconfig --levels 235 mysqld on
    
    # start mysql service
    $ service mysqld start
    
    # run secure installation to setup root password, remove test database and user
    $ mysql_secure_installation
    

    PHP

    # install php and pear package
    $...
    Read More