November 2012


November 2012

Best Practices for Speeding Up Your Web Site

Minimize HTTP Requests

tag: content

80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This […]

Generating an OpenSSH Public Key and Converting it to SecSh Format


Whilst reviewing access requirements at a number of sites, we’ve found the need to make several different implementations of SSH clients and servers interoperate succesfully.

This document outlines how to convert keys between OpenSSH, (F-Secure), Sun SSH, and PuTTY implementations, using a DSA key for our examples, and also illustrates basic server-side setup […]

How to disable Core file generation Apache

First of all delete the core files which are preset on the server or under any account then

vi /etc/init.d/httpd

and below the “ulimit -n 16384? you need to put

ulimit -c 0

And Command to delete core files

#find ./ -name “core.*” -exec rm -f {} \;

Removing blank lines from a text file

Method 1: Using grep

$ grep -v ‘^$’ infile.txt > outfile.txt

Method 2: Using sed

$ sed ‘/^$/d’ infile.txt > outfile.txt

To remove blank lines from multiple files a script like the one below can be used

#!/bin/sh files=”/somefolder/*.txt” for f in $files do sed ‘/^$/d’ $f > $f.tmp mv $f.tmp $f done


Gzip is one of the frequent command used in linux . gzip command is use do to compression of a file for reducing size of file. This will saves the bandwidth if the file is transferring between different systems.Moreover the reduced size depends on the the content of the file, if the content is text, […]

MySQL Commands for reference

The following MySQL Commands were originally split into several smaller blog posts that I had built up over the years, I have now consolidated the articles into a single post (feel free to link to this resource from your site).

Please note this article contains commands & examples for the mysql command line client, it […]

Centos harden Steps

When it comes to having a Linux server hosted in a data center or it is not behind any kind of Firewall or NAT device there are a number of security requirements that need to be addressed. Linux servers generally come with no protection configured by default and depending on the hosting company or distro […]


tar [-cxtzjvfpPN] file and directory …. parameters:

-c: create a compressed file parameters command (create mean); -x: parameter instructions to unlock a compressed file! -T: View file tarfile inside! Special attention to the parameters issued, c / x / t only the existence of a! Not exist! Because it is not possible at the same […]

MySQL ERROR 1045 Access denied for ‘user’@’localhost’

The Problem

The logfile of mysqld, /var/log/upstart/mysql.log, reported yet another error:

?120618 14:07:31 [Note] /usr/sbin/mysqld: ready for connections.

Version: ‘5.5.24-0ubuntu0.12.04.1’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 (Ubuntu)

mysqld is alive

Checking for tables which need an upgrade, are corrupt or were

not closed cleanly.

120618 14:07:36 [ERROR] Cannot find or open table nova/projects from

the internal […]

Optimizing my.cnf file for MySQL

[mysqld] socket=/path/to/mysql.sock datadir=/var/lib/mysql skip-locking skip-innodb # MySQL 4.x has query caching available. # Enable it for vast improvement and it may be all you need to tweak. query_cache_type=1 query_cache_limit=1M query_cache_size=32M # max_connections=500 # Reduced to 200 as memory will not be enough for 500 connections. # memory=key_buffer+(sort_buffer_size+read_buffer_size)*max_connections # which is now: 64 + (1 + […]