Ning Ma blog

my technology tips

November, 2013

Linux copy a folder with same user, group and other permissions

help

php very useful mysql connect function for small project

This class is very useful for small projects, it easy and fast to connect mysql with php script. Thank you Ciprian Mocanu to provide this document. The Class:

Example usage:

jQuery large pictures with a loading spinner

Basic Version In our basic version, we will have a single div containing a loading spinner and once our large image is loaded (in the background) we will remove the spinner and insert our image. There’s a few ways to approach the loading screen, two of which are: Use a background image on the holder […]

Install google X-Mod-Pagespeed on Centos 6

Step 1: Enabling Google’s mod_pagespeed Repository Create a file called /etc/yum.repos.d/mod-pagespeed.repo with the help of your favourite editor and add the following lines of code to it based on your OS bit. RHEL/CentOS/Fedora 32-Bit [mod-pagespeed] name=mod-pagespeed baseurl=http://dl.google.com/linux/mod-pagespeed/rpm/stable/i386 enabled=1 gpgcheck=0 RHEL/CentOS/Fedora 64-Bit [mod-pagespeed] name=mod-pagespeed baseurl=http://dl.google.com/linux/mod-pagespeed/rpm/stable/x86_64 enabled=1 gpgcheck=0 Step 2: Installing mod_pagespeed Module for Apache We use […]

cool jQuery touch slider owl carousel

Here is link http://owlgraphic.com/owlcarousel/ Touch enabled jQuery plugin that lets you create beautiful responsive carousel slider. 1. Load jQuery and include Owl Carousel plugin files To use Owl Carousel, you’ll need to make sure both the Owl and jQuery 1.7 or higher scripts are included.

2. Set up your HTML You don’t need any […]