Author Archives: Silver Moon

About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].

PHP strtotime in 64 bit environment

By | October 23, 2011

The strtotime function is used to convert a date in various formats to a timestamp. However its behaviour is different based on architecture it is running on, whether 32bit or 64bit. Lets take a few examples : In 64 bit environment desktop:~$ php -a Interactive shell php > echo strtotime("0000-00-00 00:00:00"); -62170005200 php > echo… Read More »

Get domain whois information with telnet

By | May 2, 2013

Whois is often used to find out the details of the owners or the registrants of a domain name. The details includes name, address, telephone number etc. Whenever a domain is registered by a user, the user has to fill out own details at the domain registrar. These details are fed into the whois system,… Read More »

PHP benefits of storing session data in database

By | October 21, 2011

PHP’s session_start method stores the session data in files by default. These files are stored in the tmp directory of the OS and are cleared at intervals by the garbage collector. Alternatively the session data can be stored in database as well. Storing session data in database has certain advantages : 1. Limit the number… Read More »

Get smooth and beautiful fonts on Ubuntu

By | May 9, 2020

To get beautiful and smooth fonts on Ubuntu : 1. Install ttf-mscorefonts-installer from synaptic This will provide the fonts like microsoft arial , tahoma , verdana , courier etc. 2. Get the xml file by Obi Bok from https://wiki.ubuntu.com/Fonts The above xml file provides special finetuned settings for antialiasing and hinting parameters for various fonts… Read More »

Play VCD on Ubuntu

By | October 1, 2011

If Totem , the default movie player does not play vcds properly , showing file permission errors , then try : 1. SMPlayer Install from synaptic : sudo apt-get install smplayer 2. mplayer Install from synaptic : sudo apt-get install mplayer 3. KPlayer Install from synaptic : sudo apt-get install kplayer To play from terminal… Read More »

Display hindi unicode fonts on Google Chrome on Ubuntu Linux

By | September 29, 2011

Google Chrome has problem displaying hindi/unicode and other Indian language fonts. For example bold hindi fonts might be displayed as square boxes. http://code.google.com/p/chromium/issues/detail?id=32109 http://code.google.com/p/chromium/issues/detail?id=21320 It is some kind of font selection bug. Lets try fixing it. 1. You may want to install the packages ttf-devanagari-fonts and ttf-indic-fonts. Also get that mangal.ttf thing from windows or… Read More »

Convert vcd dat file to mpeg on ubuntu

By | September 28, 2011

VCDs that are played on vcd players often contain the video in dat format. The dat format is internally mpeg only but has some additional header information attached. So the mpeg portion has to be ripped off to get the mpeg format. Once converted to mpeg format, it can be processed inside any video editor…. Read More »

How to Resize large images in PHP with Imagemagick

By | May 1, 2023

Resizing images Web applications often need to work with images like pictures of users or photos etc. So the need to resize images comes up when creating thumbnails for example or compressing images for storage. The default library to handle image operations in php is GD. It can be used to resize images. GD vs… Read More »

Install Ruby 1.9.2 on Ubuntu

By | July 30, 2020

As you all know Ruby is one of the most popular programming language on the web. It is recommended to install ruby 1.9.2 instead of 1.8.x I tried to install ruby from the package manager on Ubuntu, but ruby 1.9.2 is not there in the repo. So, I am going to show you how to… Read More »