Skip to content

Instantly share code, notes, and snippets.

View arunssasidhar's full-sized avatar

arunssasidhar

View GitHub Profile
@arunssasidhar
arunssasidhar / Apache_module_Installation
Last active December 24, 2015 19:39
Installing a Apache module, without re-compiling the entire web server is easy with Apache extension tool (apxs). For that you need the source code you have used for compiling the Apache server. Here I will show you show you how to add Mod_Rewrite in Apache server.
Go to your Apache source directory where your module source codes are stored. Here you can see many files with .c extension.
# cd httpd-VERSION/modules/mappers
# apxs -i -a -c mod_rewrite.c
Where
c = Compile the source code
i = Copy the compiled module (.so) file to the Apache module directory.
a = Activates the module is Apache, by adding required directives in httpd.conf.
@arunssasidhar
arunssasidhar / grep_filter.sh
Created October 6, 2013 09:07
Tip : Avoid grep in its own output.
# See grep in Output.
$ ps ax | grep term
5327 ? Sl 0:01 gnome-terminal
5508 pts/0 S+ 0:00 grep --color=auto term
# Solution for this problem.
$ ps ax | grep [t]erm
5327 ? Sl 0:01 gnome-terminal
@arunssasidhar
arunssasidhar / image_convert.sh
Created October 6, 2013 08:55
Oneliner : Bulk convert of Image files using imagemagick tool.
mkdir out_dir && for i in *.JPG; do convert $i -quality 60 out_dir/$i; done