Category: Fedora

Linux: Create Text File on Linux Shell / Command Line

This is a very typical case, the need to create a temp file on the command line quickly. Opening editor, writing content, save file and quit editor is not the fastest possible way. A faster

Install Memcached on Fedora 28/27, CentOS/RHEL 7.5/6.9

Memcached is a high-performance, distributed memory object caching system, generic in nature, but originally intended for use in speeding up dynamic web applications by alleviating database load. Memcached is a very useful also in other

PHP: Calculate Real Differences Between Two Dates or Timestamps

I was using simple function to calculate difference between two dates and timestamps until I noticed, it’s not working correctly in long intervals. It’s very easy to calculate difference between two timestamps in seconds, but

Linux locate command: Find Files and Directories Quickly and Efficiently

This is quick guide howto find files and directories quick and efficiently on Linux with locate command. Linux find command is outdated, slow and complicated to use, so locate command is much better option. Locate

cURL Tip: Check that the Apache Compression (gzip, deflate) is Working

This is a quick method with using cURL to check that Apache Compression with mod_gzip and mod_deflate is working. Only the remote server headers are needed. Check that the Apache Compression is Working Get headers

Install PostgreSQL 8.4 Database Server on CentOS, Fedora, Red Hat

This is quick guide howto install PostgreSQL 8.4 (current stable 8.4.7) database server on CentOS, Fedora and Red Hat. Fedora 14, Fedora 13, CentOS 5.5 and Red Hat (RHEL) 5.5 has PostgreSQL 8.4 database server

YUM History (list, info, summary, repeat, redo, undo, new)

Yum (Yellowdog Update Modified) is RPM Packet Management system for Fedora, CentOS, Red Hat, OpenSuse etc. Yum history (list, info, summary, repeat, redo, undo, new) commands is added on 3.2.25 version. So this works every

Add Hostname, Date, Time, Uptime, Load Average to Linux Terminal Title

This tip is really useful if you need/want to monitor multiple servers at the same time. This Tip works, as the tip, by which you can add the date and time the title of the

PHP CLI Colors – PHP Class Command Line Colors (bash)

PHP Command Line Interface (CLI) has not built-in coloring for script output, like example Perl language has ( So I decided to make own class for adding colors on PHP CLI output. This class works

PHP – Measure Scripts Execution Time and Page Generation Time

In many cases, it is really useful to know the exact time for how long a PHP script is running or how long will take PHP web page load. On the other hand it is

PHP stdClass to Array and Array to stdClass – stdClass Object

I think every PHP coders have come accross Arrays and stdClass Objects (belongs to PHP Predefined Classes). Sometimes it’s very useful convert Objects to Arrays and Arrays to Objects. This is easy if arrays and

nginx, PHP 5.3 and FastCGI on CentOS 5.5, Fedora 13, Red Hat RHEL 5.5/6

This is guide howto install nginx, PHP 5.3 and FastCGI webserver with MySQL and/or PostgreSQL and Memcache support on Fedora 12 and Fedora 13, CentOS 5.5, Red Hat (RHEL) 5.5/6. nginx (engine x) is a

BitLy ( PHP Class – Shorten and Expand URLs (and Hashes) with BitLy API

BitLy ( is a service which allows users to shorten, expand, share and track URLs (links). can be accessed through website and a robust and open API. Example:Shorten url ->

Delete files securely on Linux – Journaled file systems

Few days ago I write about shred, which work fine for old systems, like EXT2, but not so nice with journaled file systems. Modern file systems need something more robust, like dd and srm (a


Twitter hacked? Not really, only Twitter DNS records compromised

I before post ‘Twitter Hacked by Iranian Cyber Army’, but actually just Twitter DNS records was hacked. I think even server headers and tracepath to servers simply prove this, because they are completely different

Twitter Hacked by Iranian Cyber Army

Twitter site is hacked by Iranian Cyber Army. Here is some screenshots and full info about page. Screenshots Server info and full html content lynx -mime_header HTTP/1.1 200 OK Date: Fri, 18 Dec 2009

Delete files permanently with shred command in Linux – Remove absolutely

Sometimes need to delete files whose contents should disappear absolutely, completely and safely. Linux command rm just remove file and it is still possible to dig out from the disk. Fortunately for Linux can be

Format bytes with PHP – B, KB, MB, GB, TB, PB, EB, ZB, YB converter

Simple PHP function that formats the bytes to the desired form. Possible unit options are: Byte (B) Kilobyte (KB) Megabyte (MB) Gigabyte (GB) Terabyte (TB) Petabyte (PB) Exabyte (EB) Zettabyte (ZB) Yottabyte (YB) Function takes

PostgreSQL: Partitioned Table vs Non Partitioned Table (Part 3)

This article compares the speed and performance of queries between partitioned and non partitioned PostgreSQL tables. However, it is important to remember that the PostgreSQL tables partitioning has also another benefits, than the better performance

PHP: Loop through dates (from date to date) with strtotime() function

This is very easy way loop through dates (from date to date) with PHP strtotime() function. This example only echo dates, but of course this model can be used more complicated situations. <?php // Set