Blog Left Sidebar

  • Home
  • Blog Left Sidebar
July 23, 2015 0 Comments

cd /etc/yum.repos.d sudo wget http://www.hop5.in/yum/el6/hop5.repo [root@node1 ~]# yum clean all [root@node1 ~]# yum install hhvm [root@node1 ~]# yum update hiphop-php After this, check that hhvm is installed correctly [root@node1 ~]# hhvm --version

July 23, 2015 0 Comments

Install Node from the EPEL Repository An alternative installation method uses the EPEL (Extra Packages for Enterprise Linux) repository that is available for CentOS and related distributions. To gain access to the EPEL

March 27, 2015 0 Comments

How to run nodejs from background. Here is an easy way $ nohup node app.js & Howevery, the forever will do more things, such like export log files, js api... $ sudo npm

February 25, 2015 0 Comments

List all rules with line number: iptables -nL --line-numbers Block all access from 46.151.0.0/16 range at line 12: iptables -I INPUT 12 -s 46.151.0.0/16 -j DROP delete rules based on their number and

January 16, 2015 0 Comments

var cartTemplate = ' Name: {{na}} Sku: {{sk}}'; var compiled = Handlebars.compile(cartTemplate); console.log(compiled({na: ‘Compact Round Trampoline’, sk : ‘R54’})); console.log(compiled({na: ‘Medium Round Trampoline, sk : ‘R79’})); From above sample code, we can define

January 9, 2015 1 Comment

Here is a good example of backbone validate Backbone.js Test by Ning Backbone.js Test by Ning

January 9, 2015 0 Comments

console.log(yourObject instanceof Backbone.Model); or console.log(yourObject instanceof yourModel); The instanceof operator tests whether an object has in its prototype chain the prototype property of a constructor.

February 5, 2014 1 Comment

1.Install fail2ban Because fail2ban is not available from CentOS, we should start by downloading the EPEL repository: rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm Follow up by installing fail2ban: yum install fail2ban 2 Copy the Configuration File

January 28, 2014 0 Comments

here is easy way to remove iptables rules iptables -L INPUT --line-numbers output: num target prot opt source destination 1 fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh remove rule by num iptables -D

January 23, 2014 0 Comments

under the sub vcl_rev add this code if (req.http.User-Agent ~ "(?i)ip(hone|od)") { set req.http.X-Device = "mobile-iphone"; } elsif (req.http.User-Agent ~ "(?i)ipad") { set req.http.X-Device = "tablet-ipad"; } elsif (req.http.User-Agent ~ "(?i)android.*(mobile|mini)") { set