Installing locales on your Ubuntu server

ubuntu-18.04

If your PHP script does not display textual representation of week, day and month in your native language it could depend on locales. First of all test to write the following code in your PHP script: /* Set locale to Swedish – change sv_SV to your ountry code */setlocale(LC_ALL, ‘sv_SV’);/* Output: fredag 22 december 1978 … Read more

Infinite blink fade loop effect with jQuery

ubuntudog-js

This article will show you how easy it is to make an object fadein and out forever. 1. Create a HTML file and in the <head> section include the following code: <script type=”text/javascript” src=”jquery-1.3.2.min.js”></script><style type=”text/css”>.box {border:1px solid black;background:gray;padding:10px;}</style> 2. Now in between <body></body> tags copy and paste the code below: <div class=”box”>This is a box</div><script … Read more

Track your visitors by GeoIP – Part 2

This article is continued from Part 1. Warning: geoip_record_by_name() [function.geoip-record-by-name]: Required database not available at /usr/share/GeoIP/GeoIPCity.dat. in /var/www/test.php on line 3 1. As you see in the warning above tells us that we need to install GeoIPCity.dat 1. Install cities wget https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gzgunzip GeoLiteCity.dat.gzsudo mkdir -v /usr/share/GeoIPsudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat 2. Search php.net for geoip_record_by_name() … Read more

Track your visitors by GeoIP – Part1

In this article I am going to describe how get the data from your visitors based on geographic location. I’ll use PECL extension for PHP called geoip. Step 1First we need to install PEAR package (if you’ve not installed it yet). We also need to install needed dependencies and libraries like re2c, libgeoip1 and libgeoip-dev.  … Read more

Convert a file to utf-8 charset

Convert a iso-8859-1 charset file into a utf-8 charset file using standard Linux tools. The solution is using bash shell on a Linux OS: iconv –from-code=ISO-8859-1 –to-code=UTF-8 iso.txt > utf.txt

Deleting mail in postfix queue (mailq)

Postfix stores mails in a queue before sending it. Sometimes you wish to remove the mails from the queue but wonder how. Postfix has a command line called postsuper which can be used to delete unsent mails from the queue. Before removing the mail from the queue it is good idea to list all mails … Read more

Installing php-ffmpeg on ubuntu from source

This tutorial will teach you how to successfully install php-ffmpeg on ubuntu 7.10 but approach is the same no matter which Ubuntu version you might use.  You do not need to follow steps below if you run latest Ubuntu release. You can install php-ffmpeg as a module via aptitude or synaptic. Before you start with … Read more

Samba mounting

Mounting samba share as non root user and mounting samba share and startup.Source: ubuntu.com Mounting a share on the local filesystem allows you to work around programs that do not yet use GnomeVFS to browse remote shares transparently. To mount a Samba share, first install smbfs: sudo apt-get updatesudo apt-get install smbfs To allow non … Read more