get all the urls in html file (local or on server).

2014-02-17 1 min read Bash Fedora

To use this, you will need the lynx tool, so install that first.

sudo yum install lynx

Now, to get list of all the URLs in local html file or some URL, just execute this:

lynx -dump -listonly

 

Continue reading

cgroups – use to control your cpu and memory

2014-01-06 2 min read Fedora Firefox Learning

cgroups is a kernel feature and with userspace utilities, we can use the feature to control the cpu and memory for per process. So, lets first install the required tools.

sudo yum install libcgroup-tools

Now, we need to enable the service.

sudo systemctl enable cgconfig.service
sudo systemctl enable cgred.service

cgconfig.service is to enable configuration for cgroups and
cgred.service is to enable configuration for cgroups for processes depending on the name.

Continue reading

Apache server stats with small and useful bash script.

2013-11-29 3 min read Bash Linux Uncategorized Wordpress

Just copy this script to your web-server cgi-bin directory and enjoy.

The script with show the common errors like 404 Error, Internal Server Error and others. It will show the User agent distribution using simple commands like grep, uniq, awk and so on.

You would need to change the tfile – which is temporary file and also the access.log path in the next line.

Just re-direct the output to some file with html extenstion. You could even put this in the cron which re-directs the output to some html in server document root.

Continue reading

Firefox troubleshooting

2013-03-11 1 min read Firefox

Here are few quick tips on getting to see what could be wrong with firefox.

Config entries – about:config

Support Information – about:support

Details on config entries – http://kb.mozillazine.org/About:config_entries

Reset firefox profile – https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems

Firefox profiles – https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data

 

Continue reading

Taking screenshot in firefox.

2013-02-03 1 min read Firefox

Couple of days back, I was trying to take screenshot with Firefox. As usual I started out with searching for plugins which could take a screen shot for the whole page and not just the visible portion of the page. Installed couple of them, some did not work. Finally I found something called Development Bar.

So, here is a simple way to take a screenshot. Press “Shift+F12”. This will bring up a bar in the bottom of the firefox window. To take a screenshot, type:

Continue reading

Install the fastest Mozilla browser on your N900

2011-07-02 2 min read Maemo N900

Firefox 7.0 is the browser that I am currently using on my N900. Its pretty fast compared to its predecessors. Its not even in BETA and all you can get is the nightly build. For me, its okay, as I like playing with my systems and mobile. If that is okay with you read on….

Head over to the firefox nightly build website Firefox Nightly Builds. Go to the links for the mobile version and then select Maemo build and download it.. Copy the tar.bz2 file to your N900 or directly download it from the handset 🙂

Continue reading

fork a new process in perl

2011-01-27 1 min read Uncategorized

I was doing something today and found that I require to fork a new process in perl. Now I had never done this earlier, so I did not know how to do this.

First some background :

I was doing some program very similar to http server, where the script accepts some input through a socket and then processes the same. In doing so I was seeing that the script was taking some time in processing the input and thus was not processing the second request until the first one was completed. Simple solution, fork the process.

Continue reading
Older posts