Sometimes need special character and you did not know how to write it in code. Here is most common list of HTML entities with their numbers and names.
Author: nerijuso
How Install Nginx, PHP 5.4 and PHP-FPM on CentOS
This is fast way how to install nginx, php 5.4 and other dependencies. Use this script on your own risk.
#!/bin/bash if ! [ $(id -u) = 0 ]; then echo "Please login via root!" exit 1 else yum install update #Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm #CentOS 6.4/6.3/6.2/6.1/6/5.9 Nginx repository cat <<EOF >/etc/yum.repos.d/nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 EOF #Install Nginx, PHP 5.4 and PHP-FPM yum --enablerepo=remi,remi-test install nginx php-fpm php-common #Install PHP 5.4 modules yum --enablerepo=remi install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml -y -y #Start Nginx HTTP server and PHP-FPM service nginx start service php-fpm start #Autostart Nginx and PHP-FPM on boot chkconfig nginx on chkconfig php-fpm on #Install mysql yum install mysql mysql-server -y service mysqld start chkconfig mysqld on fi
Error codes
Some times on website we get error code and we do not know what does it mean. Here I write array of codes with explanation:
Equal div column heights
Sometimes we need to do equals columns. I think most all of you do it with javascript, but that’s a whole lot of code.The same result can be achieved with just a few lines of css. Here is a demonstration on Bootply:
http://www.bootply.com/QOfKYIVeGF
livehelperchat.com addon for whmcs
This is addon for whmcs. This addon displays user profile in chat window.
Information you will see in chat window:
- Client name, last name, credits, email, company name.
- Unpaid client invoices
- Client products (ex. domains, hosting)
Install
- Copy files to your whmcs system files (modules/addons)
- Go to whmcs admin panel, and go to Setup->Addon Modules.
- Find livehelper addon and activate it.
- Click configure button and enable widget on you whmcs system. Change settings by your own wishes. (you do not need to add any additional code to whmcs)
Good luck!
How to Create Custom RSS Feeds in WordPress?
WordPress comes with built-in default RSS feeds. You can tweak the default feeds by adding custom content to your RSS Feeds, or even adding post thumbnail to your RSS Feeds. The default RSS and Atom feeds are enough for most users, but you may wish to create a custom RSS feed for delivering specific type of content. In this article, we will show you how to create custom RSS feeds in WordPress.
Get first paragraph with php
Here’s a useful PHP function to return the first paragraph from a HTML text string. It involves finding the character position of the first closing “p” tag from the first paragraph.
Add the following function somewhere in you PHP.
How remove empty paragraph with php?
Today I will show simple, but simetimes very usefull example, how to remove empty paragrapth from your text.
My code:
<?php $html = "abc<p></p><p>dd</p><b>non-empty</b>"; $pattern = "/<p[^>]*><\\/p[^>]*>/"; //$pattern = "/<[^\/>]*>([\s]?)*<\/[^>]*>/"; use this pattern to remove any empty tag echo preg_replace($pattern, '', $html); // output //abc<p>dd</p><b>non-empty</b> ?>
Very simple 🙂
Html select custom style
Some time we need to style select box. Here I will show you simple example how to do this. For example we have simple select box html:
How get img thumbnails from Vimeo?
This is very easy. Vimeo has API. This is the Vimeo Simple API docs.
You should make a Video Request
To get data about a specific video, use the following url: